diff --git a/admin.go b/admin.go index 6408cfe..8b48cd8 100644 --- a/admin.go +++ b/admin.go @@ -1,675 +1,675 @@ /* * Copyright © 2018-2021 Musing Studio LLC. * * This file is part of WriteFreely. * * WriteFreely is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, included * in the LICENSE file in this source code package. */ package writefreely import ( "database/sql" "fmt" "net/http" "runtime" "strconv" "strings" "time" "github.com/gorilla/mux" "github.com/writeas/impart" "github.com/writeas/web-core/auth" "github.com/writeas/web-core/log" "github.com/writeas/web-core/passgen" "github.com/writefreely/writefreely/appstats" "github.com/writefreely/writefreely/config" ) var ( appStartTime = time.Now() sysStatus systemStatus ) const adminUsersPerPage = 30 type systemStatus struct { Uptime string NumGoroutine int // General statistics. MemAllocated string // bytes allocated and still in use MemTotal string // bytes allocated (even if freed) MemSys string // bytes obtained from system (sum of XxxSys below) Lookups uint64 // number of pointer lookups MemMallocs uint64 // number of mallocs MemFrees uint64 // number of frees // Main allocation heap statistics. HeapAlloc string // bytes allocated and still in use HeapSys string // bytes obtained from system HeapIdle string // bytes in idle spans HeapInuse string // bytes in non-idle span HeapReleased string // bytes released to the OS HeapObjects uint64 // total number of allocated objects // Low-level fixed-size structure allocator statistics. // Inuse is bytes used now. // Sys is bytes obtained from system. StackInuse string // bootstrap stacks StackSys string MSpanInuse string // mspan structures MSpanSys string MCacheInuse string // mcache structures MCacheSys string BuckHashSys string // profiling bucket hash table GCSys string // GC metadata OtherSys string // other system allocations // Garbage collector statistics. NextGC string // next run in HeapAlloc time (bytes) LastGC string // last run in absolute time (ns) PauseTotalNs string PauseNs string // circular buffer of recent GC pause times, most recent at [(NumGC+255)%256] NumGC uint32 } type inspectedCollection struct { CollectionObj Followers int LastPost string } type instanceContent struct { ID string Type string Title sql.NullString Content string Updated time.Time } type AdminPage struct { UpdateAvailable bool } func NewAdminPage(app *App) *AdminPage { ap := &AdminPage{} if app.updates != nil { ap.UpdateAvailable = app.updates.AreAvailableNoCheck() } return ap } func (c instanceContent) UpdatedFriendly() string { /* // TODO: accept a locale in this method and use that for the format var loc monday.Locale = monday.LocaleEnUS return monday.Format(u.Created, monday.DateTimeFormatsByLocale[loc], loc) */ return c.Updated.Format("January 2, 2006, 3:04 PM") } func handleViewAdminDash(app *App, u *User, w http.ResponseWriter, r *http.Request) error { p := struct { *UserPage *AdminPage Message string UsersCount, CollectionsCount, PostsCount int64 }{ UserPage: NewUserPage(app, r, u, "Admin", nil), AdminPage: NewAdminPage(app), Message: r.FormValue("m"), } // Get user stats p.UsersCount = app.db.GetAllUsersCount() var err error p.CollectionsCount, err = app.db.GetTotalCollections() if err != nil { return err } p.PostsCount, err = app.db.GetTotalPosts() if err != nil { return err } showUserPage(w, "admin", p) return nil } func handleViewAdminMonitor(app *App, u *User, w http.ResponseWriter, r *http.Request) error { updateAppStats() p := struct { *UserPage *AdminPage SysStatus systemStatus Config config.AppCfg Message, ConfigMessage string }{ UserPage: NewUserPage(app, r, u, "Admin", nil), AdminPage: NewAdminPage(app), SysStatus: sysStatus, Config: app.cfg.App, Message: r.FormValue("m"), ConfigMessage: r.FormValue("cm"), } showUserPage(w, "monitor", p) return nil } func handleViewAdminSettings(app *App, u *User, w http.ResponseWriter, r *http.Request) error { p := struct { *UserPage *AdminPage Config config.AppCfg Message, ConfigMessage string }{ UserPage: NewUserPage(app, r, u, "Admin", nil), AdminPage: NewAdminPage(app), Config: app.cfg.App, Message: r.FormValue("m"), ConfigMessage: r.FormValue("cm"), } showUserPage(w, "app-settings", p) return nil } func handleViewAdminUsers(app *App, u *User, w http.ResponseWriter, r *http.Request) error { p := struct { *UserPage *AdminPage Config config.AppCfg Message string Flashes []string Users *[]User CurPage int TotalUsers int64 TotalPages []int }{ UserPage: NewUserPage(app, r, u, "Users", nil), AdminPage: NewAdminPage(app), Config: app.cfg.App, Message: r.FormValue("m"), } p.Flashes, _ = getSessionFlashes(app, w, r, nil) p.TotalUsers = app.db.GetAllUsersCount() ttlPages := p.TotalUsers / adminUsersPerPage p.TotalPages = []int{} for i := 1; i <= int(ttlPages); i++ { p.TotalPages = append(p.TotalPages, i) } var err error p.CurPage, err = strconv.Atoi(r.FormValue("p")) if err != nil || p.CurPage < 1 { p.CurPage = 1 } else if p.CurPage > int(ttlPages) { p.CurPage = int(ttlPages) } p.Users, err = app.db.GetAllUsers(uint(p.CurPage)) if err != nil { return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get users: %v", err)} } showUserPage(w, "users", p) return nil } func handleViewAdminUser(app *App, u *User, w http.ResponseWriter, r *http.Request) error { vars := mux.Vars(r) username := vars["username"] if username == "" { return impart.HTTPError{http.StatusFound, "/admin/users"} } p := struct { *UserPage *AdminPage Config config.AppCfg Message string User *User Colls []inspectedCollection LastPost string NewPassword string TotalPosts int64 ClearEmail string }{ AdminPage: NewAdminPage(app), Config: app.cfg.App, Message: r.FormValue("m"), Colls: []inspectedCollection{}, } var err error p.User, err = app.db.GetUserForAuth(username) if err != nil { if err == ErrUserNotFound { return err } log.Error("Could not get user: %v", err) return impart.HTTPError{http.StatusInternalServerError, err.Error()} } flashes, _ := getSessionFlashes(app, w, r, nil) for _, flash := range flashes { if strings.HasPrefix(flash, "SUCCESS: ") { p.NewPassword = strings.TrimPrefix(flash, "SUCCESS: ") p.ClearEmail = p.User.EmailClear(app.keys) } } p.UserPage = NewUserPage(app, r, u, p.User.Username, nil) p.TotalPosts = app.db.GetUserPostsCount(p.User.ID) lp, err := app.db.GetUserLastPostTime(p.User.ID) if err != nil { return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get user's last post time: %v", err)} } if lp != nil { p.LastPost = lp.Format("January 2, 2006, 3:04 PM") } colls, err := app.db.GetCollections(p.User, app.cfg.App.Host) if err != nil { return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get user's collections: %v", err)} } for _, c := range *colls { ic := inspectedCollection{ CollectionObj: CollectionObj{Collection: c}, } if app.cfg.App.Federation { folls, err := app.db.GetAPFollowers(&c) if err == nil { // TODO: handle error here (at least log it) ic.Followers = len(*folls) } } app.db.GetPostsCount(&ic.CollectionObj, true) lp, err := app.db.GetCollectionLastPostTime(c.ID) if err != nil { log.Error("Didn't get last post time for collection %d: %v", c.ID, err) } if lp != nil { ic.LastPost = lp.Format("January 2, 2006, 3:04 PM") } p.Colls = append(p.Colls, ic) } showUserPage(w, "view-user", p) return nil } func handleAdminDeleteUser(app *App, u *User, w http.ResponseWriter, r *http.Request) error { if !u.IsAdmin() { return impart.HTTPError{http.StatusForbidden, "Administrator privileges required for this action"} } vars := mux.Vars(r) username := vars["username"] confirmUsername := r.PostFormValue("confirm-username") if confirmUsername != username { return impart.HTTPError{http.StatusBadRequest, "Username was not confirmed"} } user, err := app.db.GetUserForAuth(username) if err == ErrUserNotFound { return impart.HTTPError{http.StatusNotFound, fmt.Sprintf("User '%s' was not found", username)} } else if err != nil { log.Error("get user for deletion: %v", err) return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get user with username '%s': %v", username, err)} } err = app.db.DeleteAccount(user.ID) if err != nil { log.Error("delete user %s: %v", user.Username, err) return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not delete user account for '%s': %v", username, err)} } _ = addSessionFlash(app, w, r, fmt.Sprintf("User \"%s\" was deleted successfully.", username), nil) return impart.HTTPError{http.StatusFound, "/admin/users"} } func handleAdminToggleUserStatus(app *App, u *User, w http.ResponseWriter, r *http.Request) error { vars := mux.Vars(r) username := vars["username"] if username == "" { return impart.HTTPError{http.StatusFound, "/admin/users"} } user, err := app.db.GetUserForAuth(username) if err != nil { log.Error("failed to get user: %v", err) return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get user from username: %v", err)} } if user.IsSilenced() { err = app.db.SetUserStatus(user.ID, UserActive) } else { err = app.db.SetUserStatus(user.ID, UserSilenced) // reset the cache to removed silence user posts updateTimelineCache(app.timeline, true) } if err != nil { log.Error("toggle user silenced: %v", err) return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not toggle user status: %v", err)} } return impart.HTTPError{http.StatusFound, fmt.Sprintf("/admin/user/%s#status", username)} } func handleAdminResetUserPass(app *App, u *User, w http.ResponseWriter, r *http.Request) error { vars := mux.Vars(r) username := vars["username"] if username == "" { return impart.HTTPError{http.StatusFound, "/admin/users"} } // Generate new random password since none supplied pass := passgen.NewWordish() hashedPass, err := auth.HashPass([]byte(pass)) if err != nil { return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not create password hash: %v", err)} } userIDVal := r.FormValue("user") log.Info("ADMIN: Changing user %s password", userIDVal) id, err := strconv.Atoi(userIDVal) if err != nil { return impart.HTTPError{http.StatusBadRequest, fmt.Sprintf("Invalid user ID: %v", err)} } err = app.db.ChangePassphrase(int64(id), true, "", hashedPass) if err != nil { return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not update passphrase: %v", err)} } log.Info("ADMIN: Successfully changed.") addSessionFlash(app, w, r, fmt.Sprintf("SUCCESS: %s", pass), nil) return impart.HTTPError{http.StatusFound, fmt.Sprintf("/admin/user/%s", username)} } func handleViewAdminPages(app *App, u *User, w http.ResponseWriter, r *http.Request) error { p := struct { *UserPage *AdminPage Config config.AppCfg Message string Pages []*instanceContent }{ UserPage: NewUserPage(app, r, u, "Pages", nil), AdminPage: NewAdminPage(app), Config: app.cfg.App, Message: r.FormValue("m"), } var err error p.Pages, err = app.db.GetInstancePages() if err != nil { return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get pages: %v", err)} } // Add in default pages var hasAbout, hasPrivacy bool for i, c := range p.Pages { if hasAbout && hasPrivacy { break } if c.ID == "about" { hasAbout = true if !c.Title.Valid { p.Pages[i].Title = defaultAboutTitle(app.cfg) } } else if c.ID == "privacy" { hasPrivacy = true if !c.Title.Valid { - p.Pages[i].Title = defaultPrivacyTitle() + p.Pages[i].Title = defaultPrivacyTitle(app.cfg) } } } if !hasAbout { p.Pages = append(p.Pages, &instanceContent{ ID: "about", Title: defaultAboutTitle(app.cfg), Content: defaultAboutPage(app.cfg), Updated: defaultPageUpdatedTime, }) } if !hasPrivacy { p.Pages = append(p.Pages, &instanceContent{ ID: "privacy", - Title: defaultPrivacyTitle(), + Title: defaultPrivacyTitle(app.cfg), Content: defaultPrivacyPolicy(app.cfg), Updated: defaultPageUpdatedTime, }) } showUserPage(w, "pages", p) return nil } func handleViewAdminPage(app *App, u *User, w http.ResponseWriter, r *http.Request) error { vars := mux.Vars(r) slug := vars["slug"] if slug == "" { return impart.HTTPError{http.StatusFound, "/admin/pages"} } p := struct { *UserPage *AdminPage Config config.AppCfg Message string Banner *instanceContent Content *instanceContent }{ AdminPage: NewAdminPage(app), Config: app.cfg.App, Message: r.FormValue("m"), } var err error // Get pre-defined pages, or select slug if slug == "about" { p.Content, err = getAboutPage(app) } else if slug == "privacy" { p.Content, err = getPrivacyPage(app) } else if slug == "landing" { p.Banner, err = getLandingBanner(app) if err != nil { return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get banner: %v", err)} } p.Content, err = getLandingBody(app) p.Content.ID = "landing" } else if slug == "reader" { p.Content, err = getReaderSection(app) } else { p.Content, err = app.db.GetDynamicContent(slug) } if err != nil { return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get page: %v", err)} } title := "New page" if p.Content != nil { title = "Edit " + p.Content.ID } else { p.Content = &instanceContent{} } p.UserPage = NewUserPage(app, r, u, title, nil) showUserPage(w, "view-page", p) return nil } func handleAdminUpdateSite(app *App, u *User, w http.ResponseWriter, r *http.Request) error { vars := mux.Vars(r) id := vars["page"] // Validate if id != "about" && id != "privacy" && id != "landing" && id != "reader" { return impart.HTTPError{http.StatusNotFound, "No such page."} } var err error m := "" if id == "landing" { // Handle special landing page err = app.db.UpdateDynamicContent("landing-banner", "", r.FormValue("banner"), "section") if err != nil { m = "?m=" + err.Error() return impart.HTTPError{http.StatusFound, "/admin/page/" + id + m} } err = app.db.UpdateDynamicContent("landing-body", "", r.FormValue("content"), "section") } else if id == "reader" { // Update sections with titles err = app.db.UpdateDynamicContent(id, r.FormValue("title"), r.FormValue("content"), "section") } else { // Update page err = app.db.UpdateDynamicContent(id, r.FormValue("title"), r.FormValue("content"), "page") } if err != nil { m = "?m=" + err.Error() } return impart.HTTPError{http.StatusFound, "/admin/page/" + id + m} } func handleAdminUpdateConfig(apper Apper, u *User, w http.ResponseWriter, r *http.Request) error { apper.App().cfg.App.SiteName = r.FormValue("site_name") apper.App().cfg.App.SiteDesc = r.FormValue("site_desc") apper.App().cfg.App.Landing = r.FormValue("landing") apper.App().cfg.App.OpenRegistration = r.FormValue("open_registration") == "on" apper.App().cfg.App.OpenDeletion = r.FormValue("open_deletion") == "on" mul, err := strconv.Atoi(r.FormValue("min_username_len")) if err == nil { apper.App().cfg.App.MinUsernameLen = mul } mb, err := strconv.Atoi(r.FormValue("max_blogs")) if err == nil { apper.App().cfg.App.MaxBlogs = mb } apper.App().cfg.App.Federation = r.FormValue("federation") == "on" apper.App().cfg.App.PublicStats = r.FormValue("public_stats") == "on" apper.App().cfg.App.Monetization = r.FormValue("monetization") == "on" apper.App().cfg.App.Private = r.FormValue("private") == "on" apper.App().cfg.App.LocalTimeline = r.FormValue("local_timeline") == "on" if apper.App().cfg.App.LocalTimeline && apper.App().timeline == nil { log.Info("Initializing local timeline...") initLocalTimeline(apper.App()) } apper.App().cfg.App.UserInvites = r.FormValue("user_invites") if apper.App().cfg.App.UserInvites == "none" { apper.App().cfg.App.UserInvites = "" } apper.App().cfg.App.DefaultVisibility = r.FormValue("default_visibility") m := "?cm=Configuration+saved." err = apper.SaveConfig(apper.App().cfg) if err != nil { m = "?cm=" + err.Error() } return impart.HTTPError{http.StatusFound, "/admin/settings" + m + "#config"} } func updateAppStats() { sysStatus.Uptime = appstats.TimeSincePro(appStartTime) m := new(runtime.MemStats) runtime.ReadMemStats(m) sysStatus.NumGoroutine = runtime.NumGoroutine() sysStatus.MemAllocated = appstats.FileSize(int64(m.Alloc)) sysStatus.MemTotal = appstats.FileSize(int64(m.TotalAlloc)) sysStatus.MemSys = appstats.FileSize(int64(m.Sys)) sysStatus.Lookups = m.Lookups sysStatus.MemMallocs = m.Mallocs sysStatus.MemFrees = m.Frees sysStatus.HeapAlloc = appstats.FileSize(int64(m.HeapAlloc)) sysStatus.HeapSys = appstats.FileSize(int64(m.HeapSys)) sysStatus.HeapIdle = appstats.FileSize(int64(m.HeapIdle)) sysStatus.HeapInuse = appstats.FileSize(int64(m.HeapInuse)) sysStatus.HeapReleased = appstats.FileSize(int64(m.HeapReleased)) sysStatus.HeapObjects = m.HeapObjects sysStatus.StackInuse = appstats.FileSize(int64(m.StackInuse)) sysStatus.StackSys = appstats.FileSize(int64(m.StackSys)) sysStatus.MSpanInuse = appstats.FileSize(int64(m.MSpanInuse)) sysStatus.MSpanSys = appstats.FileSize(int64(m.MSpanSys)) sysStatus.MCacheInuse = appstats.FileSize(int64(m.MCacheInuse)) sysStatus.MCacheSys = appstats.FileSize(int64(m.MCacheSys)) sysStatus.BuckHashSys = appstats.FileSize(int64(m.BuckHashSys)) sysStatus.GCSys = appstats.FileSize(int64(m.GCSys)) sysStatus.OtherSys = appstats.FileSize(int64(m.OtherSys)) sysStatus.NextGC = appstats.FileSize(int64(m.NextGC)) sysStatus.LastGC = fmt.Sprintf("%.1fs", float64(time.Now().UnixNano()-int64(m.LastGC))/1000/1000/1000) sysStatus.PauseTotalNs = fmt.Sprintf("%.1fs", float64(m.PauseTotalNs)/1000/1000/1000) sysStatus.PauseNs = fmt.Sprintf("%.3fs", float64(m.PauseNs[(m.NumGC+255)%256])/1000/1000/1000) sysStatus.NumGC = m.NumGC } func adminResetPassword(app *App, u *User, newPass string) error { hashedPass, err := auth.HashPass([]byte(newPass)) if err != nil { return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not create password hash: %v", err)} } err = app.db.ChangePassphrase(u.ID, true, "", hashedPass) if err != nil { return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not update passphrase: %v", err)} } return nil } func handleViewAdminUpdates(app *App, u *User, w http.ResponseWriter, r *http.Request) error { check := r.URL.Query().Get("check") if check == "now" && app.cfg.App.UpdateChecks { app.updates.CheckNow() } p := struct { *UserPage *AdminPage CurReleaseNotesURL string LastChecked string LastChecked8601 string LatestVersion string LatestReleaseURL string LatestReleaseNotesURL string CheckFailed bool }{ UserPage: NewUserPage(app, r, u, "Updates", nil), AdminPage: NewAdminPage(app), } p.CurReleaseNotesURL = wfReleaseNotesURL(p.Version) if app.cfg.App.UpdateChecks { p.LastChecked = app.updates.lastCheck.Format("January 2, 2006, 3:04 PM") p.LastChecked8601 = app.updates.lastCheck.Format("2006-01-02T15:04:05Z") p.LatestVersion = app.updates.LatestVersion() p.LatestReleaseURL = app.updates.ReleaseURL() p.LatestReleaseNotesURL = app.updates.ReleaseNotesURL() p.UpdateAvailable = app.updates.AreAvailable() p.CheckFailed = app.updates.checkError != nil } showUserPage(w, "app-updates", p) return nil } diff --git a/app.go b/app.go index b03c824..c771b04 100644 --- a/app.go +++ b/app.go @@ -1,1078 +1,1074 @@ /* * Copyright © 2018-2021 Musing Studio LLC. * * This file is part of WriteFreely. * * WriteFreely is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, included * in the LICENSE file in this source code package. */ package writefreely import ( "crypto/tls" "database/sql" "fmt" "html/template" "io/ioutil" "net/http" "net/url" "os" "os/signal" "path/filepath" "regexp" "strings" "syscall" "time" "encoding/json" "github.com/gorilla/mux" "github.com/gorilla/schema" "github.com/gorilla/sessions" "github.com/manifoldco/promptui" stripmd "github.com/writeas/go-strip-markdown/v2" "github.com/writeas/impart" "github.com/writeas/web-core/auth" "github.com/writeas/web-core/converter" "github.com/writeas/web-core/log" "github.com/writefreely/writefreely/author" "github.com/writefreely/writefreely/config" "github.com/writefreely/writefreely/key" "github.com/writefreely/writefreely/migrations" "github.com/writefreely/writefreely/page" "golang.org/x/crypto/acme/autocert" "github.com/leonelquinteros/gotext" ) const ( staticDir = "static" assumedTitleLen = 80 postsPerPage = 10 serverSoftware = "WriteFreely" softwareURL = "https://writefreely.org" ) var ( debugging bool // Software version can be set from git env using -ldflags softwareVer = "0.13.2" // DEPRECATED VARS isSingleUser bool ) // App holds data and configuration for an individual WriteFreely instance. type App struct { router *mux.Router shttp *http.ServeMux db *datastore cfg *config.Config cfgFile string keys *key.Keychain sessionStore sessions.Store formDecoder *schema.Decoder updates *updatesCache locales string tr func (str string, ParamsToTranslate ...interface{}) interface{} timeline *localTimeline } // DB returns the App's datastore func (app *App) DB() *datastore { return app.db } // Router returns the App's router func (app *App) Router() *mux.Router { return app.router } // Config returns the App's current configuration. func (app *App) Config() *config.Config { return app.cfg } // SetConfig updates the App's Config to the given value. func (app *App) SetConfig(cfg *config.Config) { app.cfg = cfg } // SetKeys updates the App's Keychain to the given value. func (app *App) SetKeys(k *key.Keychain) { app.keys = k } func (app *App) SessionStore() sessions.Store { return app.sessionStore } func (app *App) SetSessionStore(s sessions.Store) { app.sessionStore = s } // Apper is the interface for getting data into and out of a WriteFreely // instance (or "App"). // // App returns the App for the current instance. // // LoadConfig reads an app configuration into the App, returning any error // encountered. // // SaveConfig persists the current App configuration. // // LoadKeys reads the App's encryption keys and loads them into its // key.Keychain. type Apper interface { App() *App LoadConfig() error SaveConfig(*config.Config) error LoadKeys() error LoadLocales() error ReqLog(r *http.Request, status int, timeSince time.Duration) string } // App returns the App func (app *App) App() *App { //softwareVer = "0.13.1" //softwareVer = os.Getenv("VERSION") return app } // LoadConfig loads and parses a config file. func (app *App) LoadConfig() error { log.Info("Loading %s configuration...", app.cfgFile) cfg, err := config.Load(app.cfgFile) if err != nil { log.Error("Unable to load configuration: %v", err) os.Exit(1) return err } app.cfg = cfg return nil } // SaveConfig saves the given Config to disk -- namely, to the App's cfgFile. func (app *App) SaveConfig(c *config.Config) error { return config.Save(c, app.cfgFile) } // LoadLocales reads "json" locales file created from "po" locales. func (app *App) LoadLocales() error { var err error log.Info("Reading %s locales...", app.cfg.App.Lang) //var setLang = localize(app.cfg.App.Lang) // ###############################################################################3 type translator interface {} app.tr = func(str string, ParamsToTranslate ...interface{}) interface{} { //var str string n := 1 md := false var res translator var output []interface{} var iString []interface{} setLang := gotext.NewLocale("./locales", app.cfg.App.Lang); setLang.AddDomain("base"); for _, item := range ParamsToTranslate { switch item.(type) { case int: // n > 1 for plural n = item.(int) case bool: // true for apply markdown md = item.(bool) case []interface{}: // variables passed for combined translations var s string var arr []string plural := false // true if passed variable needs to be pluralized for _, vars := range item.([]interface{}) { switch vars.(type) { case bool: // true if passed variable needs to be pluralized plural = vars.(bool) case int: iString = append(iString, vars.(int)) case int64: iString = append(iString, int(vars.(int64))) case string: s = vars.(string) if(strings.Contains(s, ";")){ // links inside translation var link [] string for j:= 0; j<=strings.Count(s,";"); j++ { link = append(link, strings.Split(s, ";")[j]) } if(plural == true){ link[0] = setLang.GetN(link[0], link[0], 2) }else{ link[0] = setLang.Get(link[0]) } iString = append(iString, "[" + link[0] + "](" + link[1] + ")") }else{ // simple string if(plural == true){ fmt.Println("PLURAL") if(len(iString) == 0){ iString = append(iString, setLang.GetN(s, s, 2)) }else{ iString = append(iString, setLang.GetN(s, s, 2)) } }else{ if(len(iString) == 0){ iString = append(iString, setLang.Get(s)) }else{ iString = append(iString, setLang.Get(s)) } } } case []string: // not used, templates don't support [] string type as function arguments arr = vars.([]string) iString = append(iString, "[" + arr[0] + "](" + arr[1] + ")") } output = iString } default: fmt.Println("invalid parameters") } } if(output != nil){ // if output for combined translations is not null if(md == true){ res = template.HTML(applyBasicMarkdown([]byte(setLang.Get(str, output...)))) }else{ res = setLang.Get(str, output...) } return res } if(md == true){ res = template.HTML(applyBasicMarkdown([]byte(setLang.Get(str)))) }else if(n > 1){ res = setLang.GetN(str, str, n) }else{ res = setLang.Get(str) } return res } //inputFile:= "eu_ES.json" inputFile := "./static/js/"+app.cfg.App.Lang+".json" file, err := ioutil.ReadFile(inputFile) if err != nil { log.Error(err.Error()) os.Exit(1) } var mfile map[string]interface{} err = json.Unmarshal(file, &mfile) var res []byte res, err = json.Marshal(mfile[app.cfg.App.Lang]) if err != nil { log.Error(err.Error()) os.Exit(1) } app.locales = string(res) return nil } // LoadKeys reads all needed keys from disk into the App. In order to use the // configured `Server.KeysParentDir`, you must call initKeyPaths(App) before // this. func (app *App) LoadKeys() error { var err error app.keys = &key.Keychain{} if debugging { log.Info(" %s", emailKeyPath) } executable, err := os.Executable() if err != nil { executable = "writefreely" } else { executable = filepath.Base(executable) } app.keys.EmailKey, err = ioutil.ReadFile(emailKeyPath) if err != nil { return err } if debugging { log.Info(" %s", cookieAuthKeyPath) } app.keys.CookieAuthKey, err = ioutil.ReadFile(cookieAuthKeyPath) if err != nil { return err } if debugging { log.Info(" %s", cookieKeyPath) } app.keys.CookieKey, err = ioutil.ReadFile(cookieKeyPath) if err != nil { return err } if debugging { log.Info(" %s", csrfKeyPath) } app.keys.CSRFKey, err = ioutil.ReadFile(csrfKeyPath) if err != nil { if os.IsNotExist(err) { log.Error(`Missing key: %s. Run this command to generate missing keys: %s keys generate `, csrfKeyPath, executable) } return err } return nil } func (app *App) ReqLog(r *http.Request, status int, timeSince time.Duration) string { return fmt.Sprintf("\"%s %s\" %d %s \"%s\"", r.Method, r.RequestURI, status, timeSince, r.UserAgent()) } // handleViewHome shows page at root path. It checks the configuration and // authentication state to show the correct page. func handleViewHome(app *App, w http.ResponseWriter, r *http.Request) error { if app.cfg.App.SingleUser { // Render blog index return handleViewCollection(app, w, r) } // Multi-user instance forceLanding := r.FormValue("landing") == "1" if !forceLanding { // Show correct page based on user auth status and configured landing path u := getUserSession(app, r) if app.cfg.App.Chorus { // This instance is focused on reading, so show Reader on home route if not // private or a private-instance user is logged in. if !app.cfg.App.Private || u != nil { return viewLocalTimeline(app, w, r) } } if u != nil { // User is logged in, so show the Pad return handleViewPad(app, w, r) } if app.cfg.App.Private { return viewLogin(app, w, r) } if land := app.cfg.App.LandingPath(); land != "/" { return impart.HTTPError{http.StatusFound, land} } } return handleViewLanding(app, w, r) } func handleViewLanding(app *App, w http.ResponseWriter, r *http.Request) error { forceLanding := r.FormValue("landing") == "1" p := struct { page.StaticPage *OAuthButtons Flashes []template.HTML Banner template.HTML Content template.HTML ForcedLanding bool }{ StaticPage: pageForReq(app, r), OAuthButtons: NewOAuthButtons(app.Config()), ForcedLanding: forceLanding, } banner, err := getLandingBanner(app) if err != nil { log.Error("unable to get landing banner: %v", err) return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get banner: %v", err)} } p.Banner = template.HTML(applyMarkdown([]byte(banner.Content), "", app.cfg)) content, err := getLandingBody(app) if err != nil { log.Error("unable to get landing content: %v", err) return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get content: %v", err)} } p.Content = template.HTML(applyMarkdown([]byte(content.Content), "", app.cfg)) // Get error messages session, err := app.sessionStore.Get(r, cookieName) if err != nil { // Ignore this log.Error("Unable to get session in handleViewHome; ignoring: %v", err) } flashes, _ := getSessionFlashes(app, w, r, session) for _, flash := range flashes { p.Flashes = append(p.Flashes, template.HTML(flash)) } // Show landing page return renderPage(w, "landing.tmpl", p) } func handleTemplatedPage(app *App, w http.ResponseWriter, r *http.Request, t *template.Template) error { p := struct { page.StaticPage ContentTitle string Content template.HTML - ExtraContent template.HTML PlainContent string Updated string - //BlogStats template.HTML AboutStats *InstanceStats }{ StaticPage: pageForReq(app, r), } if r.URL.Path == "/about" || r.URL.Path == "/privacy" { var c *instanceContent var err error if r.URL.Path == "/about" { c, err = getAboutPage(app) // Fetch stats p.AboutStats = &InstanceStats{} p.AboutStats.NumPosts, _ = app.db.GetTotalPosts() p.AboutStats.NumBlogs, _ = app.db.GetTotalCollections() } else { c, err = getPrivacyPage(app) } if err != nil { return err } p.ContentTitle = c.Title.String p.Content = template.HTML(applyMarkdown([]byte(c.Content), "", app.cfg)) - //p.ExtraContent = template.HTML(applyMarkdown([]byte(c.ExtraContent), "", app.cfg)) - //p.BlogStats = template.HTML(applyMarkdown([]byte(c.BlogStats), "", app.cfg)) p.PlainContent = shortPostDescription(stripmd.Strip(c.Content)) if !c.Updated.IsZero() { p.Updated = c.Updated.Format("January 2, 2006") } } // Serve templated page err := t.ExecuteTemplate(w, "base", p) if err != nil { log.Error("Unable to render page: %v", err) } return nil } func pageForReq(app *App, r *http.Request) page.StaticPage { p := page.StaticPage{ AppCfg: app.cfg.App, Path: r.URL.Path, Version: "v" + softwareVer, Tr: app.tr, } // Use custom style, if file exists if _, err := os.Stat(filepath.Join(staticDir, "local", "custom.css")); err == nil { p.CustomCSS = true } // Add user information, if given var u *User accessToken := r.FormValue("t") if accessToken != "" { userID := app.db.GetUserID(accessToken) if userID != -1 { var err error u, err = app.db.GetUserByID(userID) if err == nil { p.Username = u.Username } } } else { u = getUserSession(app, r) if u != nil { p.Username = u.Username p.IsAdmin = u != nil && u.IsAdmin() p.CanInvite = canUserInvite(app.cfg, p.IsAdmin) } } p.CanViewReader = !app.cfg.App.Private || u != nil p.Locales = app.locales return p } var fileRegex = regexp.MustCompile("/([^/]*\\.[^/]*)$") // Initialize loads the app configuration and initializes templates, keys, // session, route handlers, and the database connection. func Initialize(apper Apper, debug bool) (*App, error) { debugging = debug apper.LoadConfig() // Generate JSON format locales apper.App().GenJsonFiles() apper.LoadLocales() // Load templates err := InitTemplates(apper.App().Config()) if err != nil { return nil, fmt.Errorf("load templates: %s", err) } // Load keys and set up session initKeyPaths(apper.App()) // TODO: find a better way to do this, since it's unneeded in all Apper implementations err = InitKeys(apper) if err != nil { return nil, fmt.Errorf("init keys: %s", err) } apper.App().InitUpdates() apper.App().InitSession() apper.App().InitDecoder() err = ConnectToDatabase(apper.App()) if err != nil { return nil, fmt.Errorf("connect to DB: %s", err) } initActivityPub(apper.App()) // Handle local timeline, if enabled if apper.App().cfg.App.LocalTimeline { log.Info("Initializing local timeline...") initLocalTimeline(apper.App()) } return apper.App(), nil } func Serve(app *App, r *mux.Router) { log.Info("Going to serve...") isSingleUser = app.cfg.App.SingleUser app.cfg.Server.Dev = debugging // Handle shutdown c := make(chan os.Signal, 2) signal.Notify(c, os.Interrupt, syscall.SIGTERM) go func() { <-c log.Info("Shutting down...") shutdown(app) log.Info("Done.") os.Exit(0) }() // Start gopher server if app.cfg.Server.GopherPort > 0 && !app.cfg.App.Private { go initGopher(app) } // Start web application server var bindAddress = app.cfg.Server.Bind if bindAddress == "" { bindAddress = "localhost" } var err error if app.cfg.IsSecureStandalone() { if app.cfg.Server.Autocert { m := &autocert.Manager{ Prompt: autocert.AcceptTOS, Cache: autocert.DirCache(app.cfg.Server.TLSCertPath), } host, err := url.Parse(app.cfg.App.Host) if err != nil { log.Error("[WARNING] Unable to parse configured host! %s", err) log.Error(`[WARNING] ALL hosts are allowed, which can open you to an attack where clients connect to a server by IP address and pretend to be asking for an incorrect host name, and cause you to reach the CA's rate limit for certificate requests. We recommend supplying a valid host name.`) log.Info("Using autocert on ANY host") } else { log.Info("Using autocert on host %s", host.Host) m.HostPolicy = autocert.HostWhitelist(host.Host) } s := &http.Server{ Addr: ":https", Handler: r, TLSConfig: &tls.Config{ GetCertificate: m.GetCertificate, }, } s.SetKeepAlivesEnabled(false) go func() { log.Info("Serving redirects on http://%s:80", bindAddress) err = http.ListenAndServe(":80", m.HTTPHandler(nil)) log.Error("Unable to start redirect server: %v", err) }() log.Info("Serving on https://%s:443", bindAddress) log.Info("---") err = s.ListenAndServeTLS("", "") } else { go func() { log.Info("Serving redirects on http://%s:80", bindAddress) err = http.ListenAndServe(fmt.Sprintf("%s:80", bindAddress), http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, app.cfg.App.Host, http.StatusMovedPermanently) })) log.Error("Unable to start redirect server: %v", err) }() log.Info("Serving on https://%s:443", bindAddress) log.Info("Using manual certificates") log.Info("---") err = http.ListenAndServeTLS(fmt.Sprintf("%s:443", bindAddress), app.cfg.Server.TLSCertPath, app.cfg.Server.TLSKeyPath, r) } } else { log.Info("Serving on http://%s:%d\n", bindAddress, app.cfg.Server.Port) log.Info("---") err = http.ListenAndServe(fmt.Sprintf("%s:%d", bindAddress, app.cfg.Server.Port), r) } if err != nil { log.Error("Unable to start: %v", err) os.Exit(1) } } func (app *App) InitDecoder() { // TODO: do this at the package level, instead of the App level // Initialize modules app.formDecoder = schema.NewDecoder() app.formDecoder.RegisterConverter(converter.NullJSONString{}, converter.ConvertJSONNullString) app.formDecoder.RegisterConverter(converter.NullJSONBool{}, converter.ConvertJSONNullBool) app.formDecoder.RegisterConverter(sql.NullString{}, converter.ConvertSQLNullString) app.formDecoder.RegisterConverter(sql.NullBool{}, converter.ConvertSQLNullBool) app.formDecoder.RegisterConverter(sql.NullInt64{}, converter.ConvertSQLNullInt64) app.formDecoder.RegisterConverter(sql.NullFloat64{}, converter.ConvertSQLNullFloat64) } // ConnectToDatabase validates and connects to the configured database, then // tests the connection. func ConnectToDatabase(app *App) error { // Check database configuration if app.cfg.Database.Type == driverMySQL && (app.cfg.Database.User == "" || app.cfg.Database.Password == "") { return fmt.Errorf("Database user or password not set.") } if app.cfg.Database.Host == "" { app.cfg.Database.Host = "localhost" } if app.cfg.Database.Database == "" { app.cfg.Database.Database = "writefreely" } // TODO: check err connectToDatabase(app) // Test database connection err := app.db.Ping() if err != nil { return fmt.Errorf("Database ping failed: %s", err) } return nil } // FormatVersion constructs the version string for the application func FormatVersion() string { return serverSoftware + " " + softwareVer } // OutputVersion prints out the version of the application. func OutputVersion() { fmt.Println(FormatVersion()) } // NewApp creates a new app instance. func NewApp(cfgFile string) *App { return &App{ cfgFile: cfgFile, } } // CreateConfig creates a default configuration and saves it to the app's cfgFile. func CreateConfig(app *App) error { log.Info("Creating configuration...") c := config.New() log.Info("Saving configuration %s...", app.cfgFile) err := config.Save(c, app.cfgFile) if err != nil { return fmt.Errorf("Unable to save configuration: %v", err) } return nil } // DoConfig runs the interactive configuration process. func DoConfig(app *App, configSections string) { if configSections == "" { configSections = "server db app" } // let's check there aren't any garbage in the list configSectionsArray := strings.Split(configSections, " ") for _, element := range configSectionsArray { if element != "server" && element != "db" && element != "app" { log.Error("Invalid argument to --sections. Valid arguments are only \"server\", \"db\" and \"app\"") os.Exit(1) } } d, err := config.Configure(app.cfgFile, configSections) if err != nil { log.Error("Unable to configure: %v", err) os.Exit(1) } app.cfg = d.Config connectToDatabase(app) defer shutdown(app) if !app.db.DatabaseInitialized() { err = adminInitDatabase(app) if err != nil { log.Error(err.Error()) os.Exit(1) } } else { log.Info("Database already initialized.") } if d.User != nil { u := &User{ Username: d.User.Username, HashedPass: d.User.HashedPass, Created: time.Now().Truncate(time.Second).UTC(), } // Create blog log.Info("Creating user %s...\n", u.Username) err = app.db.CreateUser(app.cfg, u, app.cfg.App.SiteName, "") if err != nil { log.Error("Unable to create user: %s", err) os.Exit(1) } log.Info("Done!") } os.Exit(0) } // GenerateKeyFiles creates app encryption keys and saves them into the configured KeysParentDir. func GenerateKeyFiles(app *App) error { // Read keys path from config app.LoadConfig() // Create keys dir if it doesn't exist yet fullKeysDir := filepath.Join(app.cfg.Server.KeysParentDir, keysDir) if _, err := os.Stat(fullKeysDir); os.IsNotExist(err) { err = os.Mkdir(fullKeysDir, 0700) if err != nil { return err } } // Generate keys initKeyPaths(app) // TODO: use something like https://github.com/hashicorp/go-multierror to return errors var keyErrs error err := generateKey(emailKeyPath) if err != nil { keyErrs = err } err = generateKey(cookieAuthKeyPath) if err != nil { keyErrs = err } err = generateKey(cookieKeyPath) if err != nil { keyErrs = err } err = generateKey(csrfKeyPath) if err != nil { keyErrs = err } return keyErrs } // CreateSchema creates all database tables needed for the application. func CreateSchema(apper Apper) error { apper.LoadConfig() connectToDatabase(apper.App()) defer shutdown(apper.App()) err := adminInitDatabase(apper.App()) if err != nil { return err } return nil } // Migrate runs all necessary database migrations. func Migrate(apper Apper) error { apper.LoadConfig() connectToDatabase(apper.App()) defer shutdown(apper.App()) err := migrations.Migrate(migrations.NewDatastore(apper.App().db.DB, apper.App().db.driverName)) if err != nil { return fmt.Errorf("migrate: %s", err) } return nil } // ResetPassword runs the interactive password reset process. func ResetPassword(apper Apper, username string) error { // Connect to the database apper.LoadConfig() connectToDatabase(apper.App()) defer shutdown(apper.App()) // Fetch user u, err := apper.App().db.GetUserForAuth(username) if err != nil { log.Error("Get user: %s", err) os.Exit(1) } // Prompt for new password prompt := promptui.Prompt{ Templates: &promptui.PromptTemplates{ Success: "{{ . | bold | faint }}: ", }, Label: "New password", Mask: '*', } newPass, err := prompt.Run() if err != nil { log.Error("%s", err) os.Exit(1) } // Do the update log.Info("Updating...") err = adminResetPassword(apper.App(), u, newPass) if err != nil { log.Error("%s", err) os.Exit(1) } log.Info("Success.") return nil } // DoDeleteAccount runs the confirmation and account delete process. func DoDeleteAccount(apper Apper, username string) error { // Connect to the database apper.LoadConfig() connectToDatabase(apper.App()) defer shutdown(apper.App()) // check user exists u, err := apper.App().db.GetUserForAuth(username) if err != nil { log.Error("%s", err) os.Exit(1) } userID := u.ID // do not delete the admin account // TODO: check for other admins and skip? if u.IsAdmin() { log.Error("Can not delete admin account") os.Exit(1) } // confirm deletion, w/ w/out posts prompt := promptui.Prompt{ Templates: &promptui.PromptTemplates{ Success: "{{ . | bold | faint }}: ", }, Label: fmt.Sprintf("Really delete user : %s", username), IsConfirm: true, } _, err = prompt.Run() if err != nil { log.Info("Aborted...") os.Exit(0) } log.Info("Deleting...") err = apper.App().db.DeleteAccount(userID) if err != nil { log.Error("%s", err) os.Exit(1) } log.Info("Success.") return nil } func connectToDatabase(app *App) { log.Info("Connecting to %s database...", app.cfg.Database.Type) var db *sql.DB var err error if app.cfg.Database.Type == driverMySQL { db, err = sql.Open(app.cfg.Database.Type, fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&parseTime=true&loc=%s&tls=%t", app.cfg.Database.User, app.cfg.Database.Password, app.cfg.Database.Host, app.cfg.Database.Port, app.cfg.Database.Database, url.QueryEscape(time.Local.String()), app.cfg.Database.TLS)) db.SetMaxOpenConns(50) } else if app.cfg.Database.Type == driverSQLite { if !SQLiteEnabled { log.Error("Invalid database type '%s'. Binary wasn't compiled with SQLite3 support.", app.cfg.Database.Type) os.Exit(1) } if app.cfg.Database.FileName == "" { log.Error("SQLite database filename value in config.ini is empty.") os.Exit(1) } db, err = sql.Open("sqlite3_with_regex", app.cfg.Database.FileName+"?parseTime=true&cached=shared") db.SetMaxOpenConns(2) } else { log.Error("Invalid database type '%s'. Only 'mysql' and 'sqlite3' are supported right now.", app.cfg.Database.Type) os.Exit(1) } if err != nil { log.Error("%s", err) os.Exit(1) } app.db = &datastore{db, app.cfg.Database.Type} } func shutdown(app *App) { log.Info("Closing database connection...") app.db.Close() } // CreateUser creates a new admin or normal user from the given credentials. func CreateUser(apper Apper, username, password string, isAdmin bool) error { // Create an admin user with --create-admin apper.LoadConfig() connectToDatabase(apper.App()) defer shutdown(apper.App()) // Ensure an admin / first user doesn't already exist firstUser, _ := apper.App().db.GetUserByID(1) if isAdmin { // Abort if trying to create admin user, but one already exists if firstUser != nil { return fmt.Errorf("Admin user already exists (%s). Create a regular user with: writefreely --create-user", firstUser.Username) } } else { // Abort if trying to create regular user, but no admin exists yet if firstUser == nil { return fmt.Errorf("No admin user exists yet. Create an admin first with: writefreely --create-admin") } } // Create the user // Normalize and validate username desiredUsername := username username = getSlug(username, "") usernameDesc := username if username != desiredUsername { usernameDesc += " (originally: " + desiredUsername + ")" } if !author.IsValidUsername(apper.App().cfg, username) { return fmt.Errorf("Username %s is invalid, reserved, or shorter than configured minimum length (%d characters).", usernameDesc, apper.App().cfg.App.MinUsernameLen) } // Hash the password hashedPass, err := auth.HashPass([]byte(password)) if err != nil { return fmt.Errorf("Unable to hash password: %v", err) } u := &User{ Username: username, HashedPass: hashedPass, Created: time.Now().Truncate(time.Second).UTC(), } userType := "user" if isAdmin { userType = "admin" } log.Info("Creating %s %s...", userType, usernameDesc) err = apper.App().db.CreateUser(apper.App().Config(), u, desiredUsername, "") if err != nil { return fmt.Errorf("Unable to create user: %s", err) } log.Info("Done!") return nil } func adminInitDatabase(app *App) error { schemaFileName := "schema.sql" if app.cfg.Database.Type == driverSQLite { schemaFileName = "sqlite.sql" } schema, err := Asset(schemaFileName) if err != nil { return fmt.Errorf("Unable to load schema file: %v", err) } tblReg := regexp.MustCompile("CREATE TABLE (IF NOT EXISTS )?`([a-z_]+)`") queries := strings.Split(string(schema), ";\n") for _, q := range queries { if strings.TrimSpace(q) == "" { continue } parts := tblReg.FindStringSubmatch(q) if len(parts) >= 3 { log.Info("Creating table %s...", parts[2]) } else { log.Info("Creating table ??? (Weird query) No match in: %v", parts) } _, err = app.db.Exec(q) if err != nil { log.Error("%s", err) } else { log.Info("Created.") } } // Set up migrations table log.Info("Initializing appmigrations table...") err = migrations.SetInitialMigrations(migrations.NewDatastore(app.db.DB, app.db.driverName)) if err != nil { return fmt.Errorf("Unable to set initial migrations: %v", err) } log.Info("Running migrations...") err = migrations.Migrate(migrations.NewDatastore(app.db.DB, app.db.driverName)) if err != nil { return fmt.Errorf("migrate: %s", err) } log.Info("Done.") return nil } // ServerUserAgent returns a User-Agent string to use in external requests. The // hostName parameter may be left empty. func ServerUserAgent(hostName string) string { hostUAStr := "" if hostName != "" { hostUAStr = "; +" + hostName } return "Go (" + serverSoftware + "/" + softwareVer + hostUAStr + ")" } diff --git a/errors.go b/errors.go index f0d3099..e3512c8 100644 --- a/errors.go +++ b/errors.go @@ -1,62 +1,79 @@ /* * Copyright © 2018-2020 Musing Studio LLC. * * This file is part of WriteFreely. * * WriteFreely is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, included * in the LICENSE file in this source code package. */ package writefreely import ( "net/http" "github.com/writeas/impart" ) +func (app *App) GetLang() string{ + //return app.cfg.App.Lang + return "eu_ES" +} +/* +func Lang(cfg *config.Config) string { + return cfg.App.Lang +} + +*/ +//var setLang = localize(AppCfg.Lang) +//var setLang = localize(cfg.App.Lang) +//var setLang = localize(app.cfg.Lang) +//var setLang = localize(config.Config.AppCfg.Lang) +var iLang = apper.App().GetLang() +var setLang = localize(iLang) + // Commonly returned HTTP errors var ( ErrBadFormData = impart.HTTPError{http.StatusBadRequest, "Expected valid form data."} ErrBadJSON = impart.HTTPError{http.StatusBadRequest, "Expected valid JSON object."} ErrBadJSONArray = impart.HTTPError{http.StatusBadRequest, "Expected valid JSON array."} ErrBadAccessToken = impart.HTTPError{http.StatusUnauthorized, "Invalid access token."} ErrNoAccessToken = impart.HTTPError{http.StatusBadRequest, "Authorization token required."} ErrNotLoggedIn = impart.HTTPError{http.StatusUnauthorized, "Not logged in."} ErrForbiddenCollection = impart.HTTPError{http.StatusForbidden, "You don't have permission to add to this collection."} ErrForbiddenEditPost = impart.HTTPError{http.StatusForbidden, "You don't have permission to update this post."} ErrUnauthorizedEditPost = impart.HTTPError{http.StatusUnauthorized, "Invalid editing credentials."} ErrUnauthorizedGeneral = impart.HTTPError{http.StatusUnauthorized, "You don't have permission to do that."} ErrBadRequestedType = impart.HTTPError{http.StatusNotAcceptable, "Bad requested Content-Type."} ErrCollectionUnauthorizedRead = impart.HTTPError{http.StatusUnauthorized, "You don't have permission to access this collection."} ErrNoPublishableContent = impart.HTTPError{http.StatusBadRequest, "Supply something to publish."} ErrInternalGeneral = impart.HTTPError{http.StatusInternalServerError, "The humans messed something up. They've been notified."} ErrInternalCookieSession = impart.HTTPError{http.StatusInternalServerError, "Could not get cookie session."} ErrUnavailable = impart.HTTPError{http.StatusServiceUnavailable, "Service temporarily unavailable due to high load."} ErrCollectionNotFound = impart.HTTPError{http.StatusNotFound, "Collection doesn't exist."} ErrCollectionGone = impart.HTTPError{http.StatusGone, "This blog was unpublished."} ErrCollectionPageNotFound = impart.HTTPError{http.StatusNotFound, "Collection page doesn't exist."} ErrPostNotFound = impart.HTTPError{Status: http.StatusNotFound, Message: "Post not found."} ErrPostBanned = impart.HTTPError{Status: http.StatusGone, Message: "Post removed."} ErrPostUnpublished = impart.HTTPError{Status: http.StatusGone, Message: "Post unpublished by author."} ErrPostFetchError = impart.HTTPError{Status: http.StatusInternalServerError, Message: "We encountered an error getting the post. The humans have been alerted."} - ErrUserNotFound = impart.HTTPError{http.StatusNotFound, "User doesn't exist."} + ErrUserNotFound = impart.HTTPError{http.StatusNotFound, setLang.Get("User doesn't exist.")} ErrRemoteUserNotFound = impart.HTTPError{http.StatusNotFound, "Remote user not found."} ErrUserNotFoundEmail = impart.HTTPError{http.StatusNotFound, "Please enter your username instead of your email address."} ErrUserSilenced = impart.HTTPError{http.StatusForbidden, "Account is silenced."} ErrDisabledPasswordAuth = impart.HTTPError{http.StatusForbidden, "Password authentication is disabled."} ) // Post operation errors var ( ErrPostNoUpdatableVals = impart.HTTPError{http.StatusBadRequest, "Supply some properties to update."} ) diff --git a/locales/en_UK/LC_MESSAGES/base.po b/locales/en_UK/LC_MESSAGES/base.po index e34afb3..0a17e91 100644 --- a/locales/en_UK/LC_MESSAGES/base.po +++ b/locales/en_UK/LC_MESSAGES/base.po @@ -1,1581 +1,1591 @@ msgid "" msgstr "" "Project-Id-Version: GOtext\n" "POT-Creation-Date: \n" "PO-Revision-Date: \n" "Last-Translator: Aitzol Berasategi \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: en\n" "X-Generator: Poedit 2.4.2\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" # base.tmpl 40 # header.tmpl 49 # pages.tmpl 21 msgid "Home" msgstr "Home" # base.tmpl 42 # header.tmpl 51 # footer.tmpl 8,26 # user/include/footer.tmpl 11 msgid "About" msgstr "About" # base.tmpl 49 # header.tmpl 58,65 # footer.tmpl 9,27 # user/include/footer.tmpl 12 # app-settings.tmpl 108 # pages.tmpl 24 msgid "Reader" msgstr "Reader" # login.tmpl 21 # password-collection.tmpl 33 # base.tmpl 51 # header.tmpl 60 msgid "Log in" msgstr "Log in" # classic.tmpl 48 # collection.tmpl 63,74 # pad.tmpl 43 # base.tmpl 33,51 # header.tmpl 14,41,60 msgid "Log out" msgstr "Log out" # base.tmpl 45 # export.tmpl 19 # collections.tmpl 13 # user/collection.tmpl 105 # admin.tmpl 59 # nav.tmpl 2 # header.tmpl 54,63 # view-user 106 msgid "Blog" msgid_plural "Blogs" msgstr[0] "Blog" msgstr[1] "Blogs" # bare.tmpl 33 # export.tmpl 19 # admin.tmpl 60 # view-user 132 msgid "Post" msgid_plural "Posts" msgstr[0] "Post" msgstr[1] "Posts" # bare.tmpl 26 # header.tmpl 55 msgid "My Posts" msgstr "My Posts" # classic.tmpl 38 # edit-meta.tmpl 43 # pad.tmpl 26,27,33 # post.tmpl 47 # base.tmpl 47 # bare.tmpl 26 # stats.tmpl 55 # import.tmpl 41 # articles.tmpl 25 # header.tmpl 21,56,64 # posts.tmpl 23,30,50,57 msgid "Draft" msgid_plural "Drafts" msgstr[0] "Draft" msgstr[1] "Drafts" # login.tmpl 27 # base.tmpl 50 # header.tmpl 59 msgid "Sign up" msgstr "Sign up" # classic.tmpl 5 # collection.tmpl 53 # pad.tmpl 5 # base.tmpl 55 # nav.tmpl 9 # header.tmpl 25,71 msgid "New Post" msgstr "New Post" # header.tmpl 29 msgid "Return to editor" msgstr "Return to editor" # footer.tmpl 10,14,34 # user/include/footer.tmpl 13 msgid "writer's guide" msgstr "writer's guide" # footer.tmpl 15,35 msgid "developers" msgstr "developers" # footer.tmpl 11,28 # user/include/footer.tmpl 14 msgid "privacy" msgstr "privacy" # footer.tmpl 16,36 msgid "source code" msgstr "source code" # base.tmpl 28 # header.tmpl 9,35 msgid "Admin dashboard" msgstr "Admin dashboard" # base.tmpl 29 # header.tmpl 10,36 msgid "Account settings" msgstr "Account settings" # import.tmpl 17 # header.tmpl 11,37 msgid "Import posts" msgstr "Import posts" # base.tmpl 30 # export.tmpl 5,10 # header.tmpl 12,38 msgid "Export" msgstr "Export" # header.tmpl 103 msgid "Dashboard" msgstr "Dashboard" # header.tmpl 104 msgid "Settings" msgstr "Settings" # export.tmpl 19 # admin.tmpl 58 # header.tmpl 106 # view-user.tmpl 59 # users.tmpl 15,21,30 msgid "User" msgid_plural "Users" msgstr[0] "User" msgstr[1] "Users" # header.tmpl 107 # pages.tmpl 13, 17 msgid "Page" msgid_plural "Pages" msgstr[0] "Page" msgstr[1] "Pages" # post.tmpl 41 # posts.tmpl 11,43,64,66 # view-user 128 msgid "View" msgid_plural "Views" msgstr[0] "View" msgstr[1] "Views" # posts.tmpl 11,43,64,66 # view-user 128 # edit-meta.tmpl 49,55 # pad.tmpl 63 msgid "View post" msgid_plural "View posts" msgstr[0] "View post" msgstr[1] "View posts" # classic.tmpl 41,45 # collection.tmpl 57 # header.tmpl 7 # edit-meta.tmpl 41 # pad.tmpl 24,36,40 # nav.tmpl 12 msgid "View Blog" msgid_plural "View Blogs" msgstr[0] "View Blog" msgstr[1] "View Blogs" # classic.tmpl 62 # pad.tmpl 124 msgid "word" msgid_plural "words" msgstr[0] "word" msgstr[1] "words" # pad.tmpl 64 msgid "Publish" msgstr "Publish" # pad.tmpl 20 # bare.tmpl 20 msgid "This post has been updated elsewhere since you last published!" msgstr "This post has been updated elsewhere since you last published!" # pad.tmpl 20 # bare.tmpl 20 msgid "Delete draft and reload" msgstr "Delete draft and reload" msgid "Updates" msgstr "Updates" # classic.tmpl 42 # pad.tmpl 37 # user/collection.tmpl 32 # collection.tmpl 54 # nav.tmpl 10 # header.tmpl 19 msgid "Customize" msgstr "Customize" # classic.tmpl 43 # collection.tmpl 55 # pad.tmpl 38 # stats.tmpl 26 # nav.tmpl 11 # header.tmpl 20 msgid "Stats" msgstr "Stats" # classic.tmpl 47 # collection.tmpl 58 # pad.tmpl 42 msgid "View Draft" msgid_plural "View Drafts" msgstr[0] "View Draft" msgstr[1] "View Drafts" # header.tmpl 111 msgid "Monitor" msgstr "Monitor" # read.tmpl 108,110 msgid "Read more..." msgstr "Read more..." # silenced.tmpl 3 msgid "Your account has been silenced." msgstr "Your account has been silenced." # silenced.tmpl 3 msgid "You can still access all of your posts and blogs, but no one else can currently see them." msgstr "You can still access all of your posts and blogs, but no one else can currently see them." # articles.tmpl 28 msgid "These are your draft posts. You can share them individually (without a blog) or move them to your blog when you're ready." msgstr "These are your draft posts. You can share them individually (without a blog) or move them to your blog when you're ready." # articles.tmpl 57 msgid "Your anonymous and draft posts will show up here once you've published some. You'll be able to share them individually (without a blog) or move them to a blog when you're ready." msgstr "Your anonymous and draft posts will show up here once you've published some. You'll be able to share them individually (without a blog) or move them to a blog when you're ready." # articles.tmpl 58 msgid "Alternatively, see your blogs and their posts on your %s page." msgstr "Alternatively, see your blogs and their posts on your %s page." # articles.tmpl 60 msgid "Start writing" msgstr "Start writing" # articles.tmpl 64 # static/js/postactions.jsmsgid "unsynced posts" msgstr "unsynced posts" # articles.tmpl 64 # collection.tmpl 43 # view-page.tmpl 51 # view-user 116 msgid "Title" msgstr "Title" # user/collection.tmpl 44 # view-user 120 msgid "Description" msgstr "Description" # user/collection.tmpl 50 msgid "This blog uses your username in its URL." msgstr "This blog uses your username in its URL." # user/collection.tmpl 50 msgid "This blog uses your username in its URL and fediverse handle." msgstr "This blog uses your username in its URL and fediverse handle." # user/collection.tmpl 50 msgid "You can change it in your %s." msgstr "You can change it in your %s." # user/collection.tmpl 63 msgid "Publicity" msgstr "Publicity" # user/collection.tmpl 68 # app-settings.tmpl 120 msgid "Unlisted" msgstr "Unlisted" # user/collection.tmpl 87 # app-settings.tmpl 121 msgid "Public" msgstr "Public" # user/collection.tmpl 74 # app-settings.tmpl 122 msgid "Private" msgstr "Private" # user/collection.tmpl 70 msgid "This blog is visible to any registered user on this instance." msgstr "This blog is visible to any registered user on this instance." # user/collection.tmpl 70 msgid "This blog is visible to anyone with its link." msgstr "This blog is visible to anyone with its link." # user/collection.tmpl 76 msgid "Only you may read this blog (while you're logged in)." msgstr "Only you may read this blog (while you're logged in)." # user/collection.tmpl 80 msgid "Password-protected:" msgstr "Password-protected:" # user/collection.tmpl 80 msgid "a memorable password" msgstr "a memorable password" # user/collection.tmpl 82 msgid "A password is required to read this blog." msgstr "A password is required to read this blog." # user/collection.tmpl 89 msgid "This blog is displayed on the public %s, and is visible to anyone with its link." msgstr "This blog is displayed on the public %s, and is visible to anyone with its link." # user/collection.tmpl 89 msgid "This blog is displayed on the public %s, and is visible to any registered user on this instance." msgstr "This blog is displayed on the public %s, and is visible to any registered user on this instance." # user/collection.tmpl 90 msgid "The public reader is currently turned off for this community." msgstr "The public reader is currently turned off for this community." # user/collection.tmpl 98 msgid "Display Format" msgstr "Display Format" # user/collection.tmpl 100 msgid "Customize how your posts display on your page." msgstr "Customize how your posts display on your page." # user/collection.tmpl 107 msgid "Dates are shown. Latest posts listed first." msgstr "Dates are shown. Latest posts listed first." # user/collection.tmpl 113 msgid "No dates shown. Oldest posts first." msgstr "No dates shown. Oldest posts first." # user/collection.tmpl 119 msgid "No dates shown. Latest posts first." msgstr "No dates shown. Latest posts first." # user/collection.tmpl 126 msgid "Text Rendering" msgstr "Text Rendering" # user/collection.tmpl 128 msgid "Customize how plain text renders on your blog." msgstr "Customize how plain text renders on your blog." # user/collection.tmpl 145 msgid "Custom CSS" msgstr "Custom CSS" # user/collection.tmpl 148 msgid "customization" msgstr "customization" # user/collection.tmpl 148 msgid "See our guide on %s." msgstr "See our guide on %s." # user/collection.tmpl 153 msgid "Post Signature" msgstr "Post Signature" # user/collection.tmpl 155 msgid "This content will be added to the end of every post on this blog, as if it were part of the post itself. Markdown, HTML, and shortcodes are allowed." msgstr "This content will be added to the end of every post on this blog, as if it were part of the post itself. Markdown, HTML, and shortcodes are allowed." # user/collection.tmpl 162 msgid "Web Monetization" msgstr "Web Monetization" # user/collection.tmpl 164 msgid "Web Monetization enables you to receive micropayments from readers that have a %s. Add your payment pointer to enable Web Monetization on your blog." msgstr "Web Monetization enables you to receive micropayments from readers that have a %s. Add your payment pointer to enable Web Monetization on your blog." # user/collection.tmpl 164 msgid "Coil membership" msgstr "Coil membership" # edit-meta.tmpl 263 # settings.tmpl 81 # user/collection.tmpl 171 msgid "Save changes" msgstr "Save changes" # user/collection.tmpl 173 msgid "Delete Blog..." msgstr "Delete Blog..." # user/collection.tmpl 190,220 # articles.tmpl 36 # posts.tmpl 19,46 msgid "Delete" msgstr "Delete" # settings.tmpl 187 # user/collection.tmpl 189 # view-user 173 msgid "Cancel" msgstr "Cancel" # user/collection.tmpl 180 msgid "Are you sure you want to delete this blog?" msgstr "Are you sure you want to delete this blog?" # posts.js 46,147 # collection.tmpl 148 # collection-tags.tmpl 96 # chorus-collection.tmpl 132 msgid "Are you sure you want to delete this post?" msgstr "Are you sure you want to delete this post?" # posts.js 302 # collection.tmpl 175,226 # collection-tags.tmpl 123,174 # chorus-collection.tmpl 159,210 msgid "Post is synced to another account. Delete the post from that account instead." msgstr "Post is synced to another account. Delete the post from that account instead." # posts.js 308 # collection.tmpl 181 # collection-tags.tmpl 129 # chorus-collection.tmpl 165 msgid "Failed to delete." msgstr "Failed to delete." # posts.js 308 # collection.tmpl 181 # collection-tags.tmpl 129 # chorus-collection.tmpl 165 msgid "Please try again." msgstr "Please try again." # user/collection.tmpl 182 msgid "This will permanently erase **%s** (%s/%s) from the internet. Any posts on this blog will be saved and made into drafts (found on your %s page)." msgstr "This will permanently erase **%s** (%s/%s) from the internet. Any posts on this blog will be saved and made into drafts (found on your %s page)." # user/collection.tmpl 183 msgid "If you're sure you want to delete this blog, enter its name in the box below and press **%s**." msgstr "If you're sure you want to delete this blog, enter its name in the box below and press **%s**." # user/collection.tmpl 202 msgid "Enter **%s** in the box below." msgstr "Enter **%s** in the box below." # user/collection.tmpl 238 msgid "Saving changes..." msgstr "Saving changes..." # collections.tmpl 72,75,84 msgid "This name is taken." msgstr "This name is taken." # pad.tmpl 61 msgid "Edit post metadata" msgstr "Edit post metadata" # edit-meta.tmpl 5,55 msgid "Edit metadata" msgstr "Edit metadata" # edit-meta.tmpl 260 msgid "now" msgstr "now" # edit-meta.tmpl 63 msgid "Slug" msgstr "Slug" # edit-meta.tmpl 66 msgid "Language" msgstr "Language" # edit-meta.tmpl 256 msgid "Direction" msgstr "Direction" # edit-meta.tmpl 258 msgid "Created" msgstr "Created" # edit-meta.tmpl 257 msgid "right-to-left" msgstr "right-to-left" # edit-meta.tmpl 47 msgid "Edit post" msgstr "Edit post" # edit-meta.tmpl 48 # pad.tmpl 62 msgid "Toggle theme" msgstr "Toggle theme" # collection-post.tmpl 66 # posts.tmpl 8 msgid "Scheduled" msgstr "Scheduled" # collection-post.tmpl 57 # post.tmpl 45,91 # articles.tmpl 35 # posts.tmpl 17,44 msgid "Edit" msgstr "Edit" # posts.tmpl 18,45 msgid "Pin" msgstr "Pin" # collection-post.tmpl 58 msgid "Unpin" msgstr "Unpin" # posts.tmpl 21,48 msgid "Move this post to another blog" msgstr "Move this post to another blog" # posts.tmpl 30,57 msgid "Change to a draft" msgstr "Change to a draft" # posts.tmpl 30,57 msgid "change to _%s_" msgstr "change to _%s_" # articles.tmpl 43,78 # posts.tmpl 26,53 msgid "move to..." msgstr "move to..." # articles.tmpl 47,83 msgid "move to %s" msgstr "move to %s" # post.tmpl 42 msgid "View raw" msgstr "View raw" # articles.tmpl 47,83 msgid "Publish this post to your blog %s" msgstr "Publish this post to your blog %s" # articles.tmpl 39,74 msgid "Move this post to one of your blogs" msgstr "Move this post to one of your blogs" # articles.tmpl 55 msgid "Load more..." msgstr "Load more..." # stats.tmpl 32 msgid "Stats for all time." msgstr "Stats for all time." # stats.tmpl 35 msgid "Fediverse stats" msgstr "Fediverse stats" # stats.tmpl 38 msgid "Followers" msgstr "Followers" # stats.tmpl 46 msgid "Top %d post" msgid_plural "Top %d posts" msgstr[0] "Top %d post" msgstr[1] "Top %d posts" # stats.tmpl 51 msgid "Total Views" msgstr "Total Views" # settings.tmpl 27 msgid "Before you go..." msgstr "Before you go..." # settings.tmpl 27 msgid "Account Settings" msgstr "Account Settings" # settings.tmpl 38 msgid "Change your account settings here." msgstr "Change your account settings here." # signup.tmpl 80 # signup-oauth.tmpl 85,87 # login.tmpl 21 # landing.tmpl 92 # settings.tmpl 43 # view-user.tmpl 62 msgid "Username" msgstr "Username" # settings.tmpl 46 msgid "Update" msgstr "Update" # settings.tmpl 56 msgid "Passphrase" msgstr "Passphrase" # settings.tmpl 58 msgid "Add a passphrase to easily log in to your account." msgstr "Add a passphrase to easily log in to your account." # settings.tmpl 59,60 msgid "Current passphrase" msgstr "Current passphrase" # settings.tmpl 61,64 msgid "New passphrase" msgstr "New passphrase" # settings.tmpl 60,64 msgid "Show" msgstr "Show" msgid "Account updated." msgstr "Account updated." # signup.tmpl 91 # signup-oauth.tmpl 92,94 # landing.tmpl 103 # settings.tmpl 69 msgid "Email" msgstr "Email" # settings.tmpl 76 msgid "Email address" msgstr "Email address" # settings.tmpl 71 msgid "Add your email to get:" msgstr "Add your email to get:" # settings.tmpl 34 msgid "Please add an **%s** and/or **%s** so you can log in again later." msgstr "Please add an **%s** and/or **%s** so you can log in again later." # settings.tmpl 73 msgid "No-passphrase login" msgstr "No-passphrase login" # settings.tmpl 74 msgid "Account recovery if you forget your passphrase" msgstr "Account recovery if you forget your passphrase" # settings.tmpl 89 msgid "Linked Accounts" msgstr "Linked Accounts" # settings.tmpl 90 msgid "These are your linked external accounts." msgstr "These are your linked external accounts." # settings.tmpl 114 msgid "Link External Accounts" msgstr "Link External Accounts" msgid "Connect additional accounts to enable logging in with those providers, instead of using your username and password." msgstr "Connect additional accounts to enable logging in with those providers, instead of using your username and password." # settings.tmpl 162 # view-user 149 msgid "Incinerator" msgstr "Incinerator" # settings.tmpl 166,169,188 msgid "Delete your account" msgstr "Delete your account" # settings.tmpl 167 msgid "Permanently erase all your data, with no way to recover it." msgstr "Permanently erase all your data, with no way to recover it." # settings.tmpl 176 # view-user 163 msgid "Are you sure?" msgstr "Are you sure?" # settings.tmpl 178 msgid "export your data" msgstr "export your data" # settings.tmpl 178 msgid "This action **cannot** be undone. It will immediately and permanently erase your account, including your blogs and posts. Before continuing, you might want to %s." msgstr "This action **cannot** be undone. It will immediately and permanently erase your account, including your blogs and posts. Before continuing, you might want to %s." # settings.tmpl 179 msgid "If you're sure, please type **%s** to confirm." msgstr "If you're sure, please type **%s** to confirm." # invite-help.tmpl 13 msgid "Invite to %s" msgstr "Invite to %s" # invite-help.tmpl 15 msgid "This invite link is expired." msgstr "This invite link is expired." # invite-help.tmpl 21 msgid "Only **one** user" msgstr "Only **one** user" # invite-help.tmpl 21 msgid "Up to **%d** users" msgstr "Up to **%d** users" # invite-help.tmpl 21 msgid "can sign up with this link." msgstr "can sign up with this link." # invite-help.tmpl 23 msgid "It expires on **%s**." msgstr "It expires on **%s**." # invite-help.tmpl 25 msgid "It can be used as many times as you like" msgstr "It can be used as many times as you like" # invite-help 25 msgid "before **%s**, when it expires" msgstr "before **%s**, when it expires" msgid "person has" msgid_plural "person have" msgstr[0] "person has" msgstr[1] "person have" # invite-help.tmpl 21 msgid "So far, **%d** %s used it." msgstr "So far, **%d** %s used it." # invite-help.tmpl 17 msgid "Copy the link below and send it to anyone that you want to join *%s*. You could paste it into an email, instant message, text message, or write it down on paper. Anyone who navigates to this special page will be able to create an account." msgstr "Copy the link below and send it to anyone that you want to join *%s*. You could paste it into an email, instant message, text message, or write it down on paper. Anyone who navigates to this special page will be able to create an account." # IMPORT PAGE # import.tmpl 28 msgid "Publish plain text or Markdown files to your account by uploading them below." msgstr "Publish plain text or Markdown files to your account by uploading them below." # import.tmpl 31 msgid "Select some files to import:" msgstr "Select some files to import:" # import.tmpl 36 msgid "Import these posts to:" msgstr "Import these posts to:" # import.tmpl 59 msgid "Import" msgstr "Import" msgid "Import complete, %d post imported." msgid_plural "Import complete, %d posts imported." msgstr[0] "Import complete, %d post imported." msgstr[1] "Import complete, %d posts imported." msgid "%d of %d posts imported, see details below." msgid_plural "%d of %d posts imported, see details below." msgstr[0] "%d of %d posts imported, see details below." msgstr[1] "%d of %d posts imported, see details below." msgid "%s is not a supported post file" msgstr "%s is not a supported post file" # export.tmpl 6 msgid "Your data on %s is always free. Download and back-up your work any time." msgstr "Your data on %s is always free. Download and back-up your work any time." # export.tmpl 11 msgid "Format" msgstr "Format" # header.tmpl 101 msgid "Admin" msgstr "Admin" # app-settings.tmpl 37 msgid "Site Title" msgstr "Site Title" # app-settings.tmpl 38 msgid "Your public site name." msgstr "Your public site name." # app-settings.tmpl 44 msgid "Site Description" msgstr "Site Description" # app-settings.tmpl 45 msgid "Describe your site — this shows in your site's metadata." msgstr "Describe your site — this shows in your site's metadata." # app-settings.tmpl 51 msgid "Host" msgstr "Host" # app-settings.tmpl 52 msgid "The public address where users will access your site, starting with `http://` or `https://`." msgstr "The public address where users will access your site, starting with `http://` or `https://`." # app-settings.tmpl 58 msgid "Community Mode" msgstr "Community Mode" # app-settings.tmpl 59 msgid "Whether your site is made for one person or many." msgstr "Whether your site is made for one person or many." # app-settings.tmpl 61 msgid "Single user" msgstr "Single user" # app-settings.tmpl 61 msgid "Multiple users" msgstr "Multiple users" # app-settings.tmpl 65 msgid "Landing Page" msgstr "Landing Page" # app-settings.tmpl 66 msgid "The page that logged-out visitors will see first. This should be an absolute path like: `/read`." msgstr "The page that logged-out visitors will see first. This should be an absolute path like: `/read`." # app-settings.tmpl 72 msgid "Open Registrations" msgstr "Open Registrations" # app-settings.tmpl 73 msgid "Allow anyone who visits the site to create an account." msgstr "Allow anyone who visits the site to create an account." # app-settings.tmpl 80 msgid "Allow account deletion" msgstr "Allow account deletion" # app-settings.tmpl 81 msgid "Allow all users to delete their account. Admins can always delete users." msgstr "Allow all users to delete their account. Admins can always delete users." # app-settings.tmpl 88 msgid "Allow invitations from..." msgstr "Allow invitations from..." # app-settings.tmpl 89 msgid "Choose who is allowed to invite new people." msgstr "Choose who is allowed to invite new people." # app-settings.tmpl 93 msgid "No one" msgstr "No one" # app-settings.tmpl 94 msgid "Only Admins" msgstr "Only Admins" # app-settings.tmpl 95 msgid "All Users" msgstr "All Users" # app-settings.tmpl 101 msgid "Private Instance" msgstr "Private Instance" # app-settings.tmpl 102 msgid "Limit site access to people with an account." msgstr "Limit site access to people with an account." # app-settings.tmpl 109 msgid "Show a feed of user posts for anyone who chooses to share there." msgstr "Show a feed of user posts for anyone who chooses to share there." # app-settings.tmpl 115 msgid "Default blog visibility" msgstr "Default blog visibility" # app-settings.tmpl 116 msgid "The default setting for new accounts and blogs." msgstr "The default setting for new accounts and blogs." # app-settings.tmpl 128 msgid "Maximum Blogs per User" msgstr "Maximum Blogs per User" # app-settings.tmpl 129 msgid "Keep things simple by setting this to **1**, unlimited by setting to **0**, or pick another amount." msgstr "Keep things simple by setting this to **1**, unlimited by setting to **0**, or pick another amount." # app-settings.tmpl 135 msgid "Federation" msgstr "Federation" # app-settings.tmpl 136 msgid "Enable accounts on this site to propagate their posts via the ActivityPub protocol." msgstr "Enable accounts on this site to propagate their posts via the ActivityPub protocol." # app-settings.tmpl 142 msgid "Public Stats" msgstr "Public Stats" # app-settings.tmpl 143 msgid "Publicly display the number of users and posts on your **%s** page." msgstr "Publicly display the number of users and posts on your **%s** page." # app-settings.tmpl 149 msgid "Monetization" msgstr "Monetization" # app-settings.tmpl 150 msgid "Enable blogs on this site to receive micropayments from readers via %s." msgstr "Enable blogs on this site to receive micropayments from readers via %s." # app-settings.tmpl 156 msgid "Minimum Username Length" msgstr "Minimum Username Length" # app-settings.tmpl 157 msgid "The minimum number of characters allowed in a username. (Recommended: 2 or more.)" msgstr "The minimum number of characters allowed in a username. (Recommended: 2 or more.)" # app-settings.tmpl 162 msgid "Save Settings" msgstr "Save Settings" # app-settings.tmpl 166 msgid "configuration docs" msgstr "configuration docs" # app-settings.tmpl 166 msgid "Still have questions? Read more details in the %s." msgstr "Still have questions? Read more details in the %s." msgid "Configuration saved." msgstr "Configuration saved." # view-user.tmpl 66 # users.tmpl 22 msgid "joined" msgstr "joined" # users.tmpl 23 msgid "type" msgstr "type" # users.tmpl 24 # view-user.tmpl 79 msgid "status" msgstr "status" # base.tmpl 31 # header.tmpl 39 # invite.tmpl 26 # users.tmpl 16 msgid "Invite people" msgstr "Invite people" # invite.tmpl 27 msgid "Invite others to join *%s* by generating and sharing invite links below." msgstr "Invite others to join *%s* by generating and sharing invite links below." # invite.tmpl 31 msgid "Maximum number of uses:" msgstr "Maximum number of uses:" # invite.tmpl 33 msgid "No limit" msgstr "No limit" # invite.tmpl 34,35,36,37,38,39,64 msgid "use" msgid_plural "uses" msgstr[0] "use" msgstr[1] "uses" # invite.tmpl 43 msgid "Expire after:" msgstr "Expire after:" # invite.tmpl 46 msgid "minute" msgid_plural "minutes" msgstr[0] "minute" msgstr[1] "minutes" # invite.tmpl 47,48,49 msgid "hour" msgid_plural "hours" msgstr[0] "hour" msgstr[1] "hours" # invite.tmpl 50,51 msgid "day" msgid_plural "days" msgstr[0] "day" msgstr[1] "days" # invite.tmpl 52 msgid "week" msgid_plural "weeks" msgstr[0] "week" msgstr[1] "weeks" # invite.tmpl 57 msgid "You cannot generate invites while your account is silenced." msgstr "You cannot generate invites while your account is silenced." # invite.tmpl 57 msgid "Generate" msgstr "Generate" # invite.tmpl 63 msgid "Link" msgstr "Link" # invite.tmpl 121,129,137,145,152 msgid "ToLink" msgstr "Link" # invite.tmpl 65 msgid "Expires" msgstr "Expires" # invite.tmpl 71 msgid "Expired" msgstr "Expired" # invite.tmpl 75 msgid "No invites generated yet." msgstr "No invites generated yet." # pages.tmpl 18 msgid "last modified" msgstr "last modified" # view-user.tmpl 85 # users.tmpl 31 msgid "Active" msgstr "Active" # view-user.tmpl 82 # users.tmpl 31 msgid "Silenced" msgstr "Silenced" # view-user.tmpl 83 msgid "Unsilence" msgstr "Unsilence" # view-user 86 msgid "disabled" msgstr "disabled" # view-user 86 msgid "Silence" msgstr "Silence" # view-user.tmpl 54 msgid "No." msgstr "No." # view-user.tmpl 70 msgid "total posts" msgstr "total posts" # view-user.tmpl 74,136 msgid "last post" msgstr "last post" # signup.tmpl 87 # login.tmpl 22 # landing.tmpl 99 # view-user 92 msgid "password" msgstr "password" msgid "Change your password" msgstr "Change your password" # view-user 100 msgid "Go to reset password page" msgstr "Go to reset password page" # view-user 141 msgid "Fediverse followers" msgstr "Fediverse followers" # view-user 124 msgid "Visibility" msgstr "Visibility" # view-user 112 msgid "Alias" msgstr "Alias" # view-user.tmpl 75,137 msgid "Never" msgstr "Never" # view-user 97 msgid "Reset" msgstr "Reset" # view-user 153,156,174 msgid "Delete this user" msgstr "Delete this user" # view-user 154 msgid "Permanently erase all user data, with no way to recover it." msgstr "Permanently erase all user data, with no way to recover it." # view-user 165 msgid "This action **cannot**be undone. It will permanently erase all traces of this user, **%s**, including their account information, blogs, and posts." msgstr "This action **cannot**be undone. It will permanently erase all traces of this user, **%s**, including their account information, blogs, and posts." # view-user 166 msgid "Please type **%s** to confirm." msgstr "Please type **%s** to confirm." # view-user 202 msgid "Silence this user? They'll still be able to log in and access their posts, but no one else will be able to see them anymore. You can reverse this decision at any time." msgstr "Silence this user? They'll still be able to log in and access their posts, but no one else will be able to see them anymore. You can reverse this decision at any time." # view-user 208 msgid "Reset this user's password? This will generate a new temporary password that you'll need to share with them, and invalidate their old one." msgstr "Reset this user's password? This will generate a new temporary password that you'll need to share with them, and invalidate their old one." # settings.tmpl 225 # user/collection.tmpl 207 # view-user.tmpl 198 msgid "Deleting..." msgstr "Deleting..." # view-user.tmpl 46 msgid "This user's password has been reset to:" msgstr "This user's password has been reset to:" # view-user.tmpl 48 msgid "They can use this new password to log in to their account. **This will only be shown once**, so be sure to copy it and send it to them now." msgstr "They can use this new password to log in to their account. **This will only be shown once**, so be sure to copy it and send it to them now." # view-user.tmpl 49 msgid "Their email address is:" msgstr "Their email address is:" # app-updates.tmlp 19 msgid "Automated update check failed." msgstr "Automated update check failed." # app-updates.tmlp 20, 24, 41 msgid "Installed version: %s (%s)." msgstr "Installed version: %s (%s)." # app-updates.tmlp 21, 42 msgid "Learn about latest releases on the %s or %s." msgstr "Learn about latest releases on the %s or %s." # app-updates.tmlp 23 msgid "WriteFreely is **up to date**." msgstr "WriteFreely is **up to date**." # app-updates.tmlp 27 msgid "Get" msgstr "Get" # app-updates.tmlp 27 msgid "A new version of WriteFreely is available! **%s %s**" msgstr "A new version of WriteFreely is available! **%s %s**" # app-updates.tmlp 28 msgid "release notes" msgstr "release notes" # app-updates.tmlp 29 msgid "Read the %s for details on features, bug fixes, and notes on upgrading from your current version, **%s**." msgstr "Read the %s for details on features, bug fixes, and notes on upgrading from your current version, **%s**." # app-updates.tmlp 31 msgid "Check now" msgstr "Check now" # app-updates.tmlp 31 msgid "Last checked" msgstr "Last checked" # app-updates.tmlp 40 msgid "Automated update checks are disabled." msgstr "Automated update checks are disabled." # ADMIN PAGES # view-page.tmpl 45 msgid "Banner" msgstr "Banner" # view-page.tmpl 56 msgid "Body" msgstr "Body" # view-page.tmpl 33 msgid "Outline your %s." msgstr "Outline your %s." # view-page.tmpl 35,37 msgid "Customize your %s page." msgstr "Customize your %s page." # view-page.tmpl 31 msgid "Describe what your instance is %s." msgstr "Describe what your instance is %s." msgid "Accepts Markdown and HTML." msgstr "Accepts Markdown and HTML." # view-page.tmpl 56 msgid "Content" msgstr "Content" # view-page.tmpl 63 msgid "Save" msgstr "Save" # view-page.tmpl 71 msgid "Saving..." msgstr "Saving..." # view-page.tmpl 48 msgid "We suggest a header (e.g. `# Welcome`), optionally followed by a small bit of text. Accepts Markdown and HTML." msgstr "We suggest a header (e.g. `# Welcome`), optionally followed by a small bit of text. Accepts Markdown and HTML." # login.tmpl 11 msgid "Log in to %s" msgstr "Log in to %s" # login.tmpl 32 msgid "Logging in..." msgstr "Logging in..." # login.tmpl 27 msgid "_No account yet?_ %s to start a blog." msgstr "_No account yet?_ %s to start a blog." msgid "Incorrect password." msgstr "Incorrect password." msgid "This user never set a password. Perhaps try logging in via OAuth?" msgstr "This user never set a password. Perhaps try logging in via OAuth?" msgid "This user never added a password or email address. Please contact us for help." msgstr "This user never added a password or email address. Please contact us for help." msgid "You're doing that too much." msgstr "You're doing that too much." msgid "Parameter `alias` required." msgstr "Parameter `alias` required." msgid "A username is required." msgstr "A username is required." msgid "Parameter `pass` required." msgstr "Parameter `pass` required." msgid "A password is required." msgstr "A password is required." msgid "Need a collection `alias` to read." msgstr "Need a collection `alias` to read." msgid "Please supply a password." msgstr "Please supply a password." msgid "Something went very wrong. The humans have been alerted." msgstr "Something went very wrong. The humans have been alerted." msgid "Logging out failed. Try clearing cookies for this site, instead." msgstr "Logging out failed. Try clearing cookies for this site, instead." # signup-oauth.tmpl 88 # landing.tmpl 95,197 msgid "your-username" msgstr "your-username" # signup.tmpl 91 # landing.tmpl 103 msgid "optional" msgstr "optional" # signup.tmpl 95 # landing.tmpl 107 msgid "Create blog" msgstr "Create blog" # signup-oauth.tmpl 59 msgid "Finish creating account" msgstr "Finish creating account" # signup-oauth.tmpl 79 msgid "Display Name" msgstr "Display Name" # oauth.tmpl 26 msgid "or" msgstr "or" # oauth.tmpl 9,13,17,20 msgid "Sign in with **%s**" msgstr "Sign in with **%s**" # landing.tmpl 77 msgid "Learn more..." msgstr "Learn more..." # landing.tmpl 114 msgid "Registration is currently closed." msgstr "Registration is currently closed." # landing.tmpl 115 msgid "another instance" msgstr "another instance" # landing.tmpl 115 msgid "You can always sign up on %s." msgstr "You can always sign up on %s." msgid "# Start your blog" msgstr "# Start your blog" msgid "# Start your blog in the fediverse" msgstr "# Start your blog in the fediverse" +msgid "" +"## Join the Fediverse\n\nThe fediverse is a large network of platforms that all speak a common language. Imagine if you could reply to _Instagram_ posts from _Twitter_, or interact with your favorite _Medium_ blogs from _Facebook_ -- federated alternatives like %s, %s, and WriteFreely enable you to do these types of things.\n\n" +msgstr "" +"## Join the Fediverse\n\nThe fediverse is a large network of platforms that all speak a common language. Imagine if you could reply to _Instagram_ posts from _Twitter_, or interact with your favorite _Medium_ blogs from _Facebook_ -- federated alternatives like %s, %s, and WriteFreely enable you to do these types of things.\n\n" + msgid "" "## Write More Socially\n" "\n" "WriteFreely can communicate with other federated platforms like _Mastodon_, so people can follow your blogs, bookmark their favorite posts, and boost them to their followers. Sign up above to create a blog and join the fediverse." msgstr "" "## Write More Socially\n" "\n" "WriteFreely can communicate with other federated platforms like _Mastodon_, so people can follow your blogs, bookmark their favorite posts, and boost them to their followers. Sign up above to create a blog and join the fediverse." msgid "About %s" msgstr "About %s" msgid "_%s_ is a place for you to write and publish, powered by %s." msgstr "_%s_ is a place for you to write and publish, powered by %s." msgid "_%s_ is an interconnected place for you to write and publish, powered by %s." msgstr "_%s_ is an interconnected place for you to write and publish, powered by %s." -msgid "_%s_ is home to %d articles across %d blogs." -msgstr "_%s_ is home to %d articles across %d blogs." +msgid "article" +msgid_plural "articles" +msgstr[0] "article" +msgstr[1] "articles" -msgid "" -"## About WriteFreely\n" -"\n" -"%s is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs.\n" -"\n" -"It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others." -msgstr "" -"## About WriteFreely\n" -"\n" -"%s is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs.\n" -"\n" -"It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others." +msgid "_%s_ is home to **%d** %s across **%d** %s." +msgstr "_%s_ is home to **%d** %s across **%d** %s." + +msgid "About WriteFreely" +msgstr "About WriteFreely" + +msgid "%s is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs." +msgstr "%s is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs." + +msgid "It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others." +msgstr "It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others." msgid "Start an instance" msgstr "Start an instance" msgid "Privacy Policy" msgstr "Privacy Policy" # privacy.tmpl 6 msgid "Last updated" msgstr "Last updated" msgid "Read the latest posts form %s." msgstr "Read the latest posts form %s." # : pages.go:98 msgid "" "%s, the software that powers this site, is built to enforce your right to privacy by default.\n" "\n" "It retains as little data about you as possible, not even requiring an email address to sign up. However, if you _do_ give us your email address, it is stored encrypted in our database.\n" "\n" "We salt and hash your account's password.We store log files, or data about what happens on our servers. We also use cookies to keep you logged in to your account.\n" "\n" "Beyond this, it's important that you trust whoever runs %s. Software can only do so much to protect you -- your level of privacy protections will ultimately fall on the humans that run this particular service." msgstr "" "%s, the software that powers this site, is built to enforce your right to privacy by default.\n" "\n" "It retains as little data about you as possible, not even requiring an email address to sign up. However, if you _do_ give us your email address, it is stored encrypted in our database.\n" "\n" "We salt and hash your account's password.We store log files, or data about what happens on our servers. We also use cookies to keep you logged in to your account.\n" "\n" "Beyond this, it's important that you trust whoever runs %s. Software can only do so much to protect you -- your level of privacy protections will ultimately fall on the humans that run this particular service." # static/js/postactions.js msgid "Unpublished post" msgstr "Unpublished post" msgid "Moved to %s" msgstr "Moved to %s" msgid "move to" msgstr "move to" msgid "moving to %s..." msgstr "moving to %s..." msgid "unable to move" msgstr "unable to move" msgid "View on %s" msgstr "View on %s" # classic.tmpl 64 # pad.tmpl 59 # bare.tmpl 30 msgid "NOTE" msgstr "NOTE" # classic.tmpl 64 # pad.tmpl 59 # bare.tmpl 30 msgid "for now, you'll need Javascript enabled to post." msgstr "for now, you'll need Javascript enabled to post." # classic.tmpl 158 # pad.tmpl 174 msgid "Your account is silenced, so you can't publish or update posts." msgstr "Your account is silenced, so you can't publish or update posts." # classic.tmpl 257 # pad.tmpl 278 msgid "Failed to post. Please try again." msgstr "Failed to post. Please try again." # classic.tmpl 163 # pad.tmpl 179 # bare.tmpl 99 msgid "You don't have permission to update this post." msgstr "You don't have permission to update this post." # pad.tmpl 16 msgid "Write..." msgstr "Write..." # classic.tmpl 34 # pad.tmpl 29 msgid "Publish to..." msgstr "Publish to..." # classic.tmpl 55 # pad.tmpl 50 msgid "Font" msgstr "Font" # read.tmpl 105 msgid "from" msgstr "from" # read.tmpl 105 msgid "Anonymous" msgstr "Anonymous" # read.tmpl 120 msgid "Older" msgstr "Older" # read.tmpl 121 msgid "Newer" msgstr "Newer" # password-collection.tmpl 31 msgid "Menu" msgstr "Menu" # password-collection.tmpl 51 msgid "This blog requires a password." msgstr "This blog requires a password." # 404-general.tmpl 1 msgid "Page not found" msgstr "Page not found" # 404-general.tmpl 4 msgid "This page is missing." msgstr "This page is missing." # 404-general.tmpl 5 msgid "Are you sure it was ever here?" msgstr "Are you sure it was ever here?" #404.tmpl 1,4 msgid "Post not found" msgstr "Post not found" #404.tmpl msgid "Why not share a thought of your own?" msgstr "Why not share a thought of your own?" # 404.tmpl msgid "Start a blog" msgstr "Start a blog" #404.tmpl msgid "%s and spread your ideas on **%s**, %s." msgstr "%s and spread your ideas on **%s**, %s." # 404.tmpl msgid "a simple blogging community" msgstr "a simple blogging community" # 404.tmpl msgid "a simple, federated blogging community" msgstr "a simple, federated blogging community" # 410.tmpl 1 msgid "Unpublished" msgst "Unpublished" # 410.tmpl 4 msgid "Post was unpublished by the author." msgstr "Post was unpublished by the author." # 410.tmpl 5 msgid "It might be back some day." msgstr "It might be back some day." + +# errors.go +msgid "User doesn't exist." +msgstr "User doesn't exist." \ No newline at end of file diff --git a/locales/eu_ES/LC_MESSAGES/base.po b/locales/eu_ES/LC_MESSAGES/base.po index 6b6810c..fab348a 100644 --- a/locales/eu_ES/LC_MESSAGES/base.po +++ b/locales/eu_ES/LC_MESSAGES/base.po @@ -1,1740 +1,1746 @@ msgid "" msgstr "" "Project-Id-Version: GOtext\n" "POT-Creation-Date: \n" "PO-Revision-Date: \n" "Last-Translator: Aitzol Berasategi \n" "Language-Team: Euskara-Basque\n" "Language: eu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.3\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" # base.tmpl 40 # header.tmpl 49 # pages.tmpl 21 msgid "Home" msgstr "Hasiera" # base.tmpl 42 # header.tmpl 51 # footer.tmpl 8,26 # user/include/footer.tmpl 11 msgid "About" msgstr "Honi buruz" # base.tmpl 49 # header.tmpl 58,65 # footer.tmpl 9,27 # user/include/footer.tmpl 12 # app-settings.tmpl 108 # pages.tmpl 24 msgid "Reader" msgstr "Irakurlea" # login.tmpl 21 # password-collection.tmpl 33 # base.tmpl 51 # header.tmpl 60 msgid "Log in" msgstr "Saioa hasi" # classic.tmpl 48 # collection.tmpl 63,74 # pad.tmpl 43 # base.tmpl 33,51 # header.tmpl 14,41,60 msgid "Log out" msgstr "Saioa itxi" # base.tmpl 45 # export.tmpl 19 # collections.tmpl 13 # user/collection.tmpl 105 # admin.tmpl 59 # nav.tmpl 2 # header.tmpl 54,63 # view-user 106 msgid "Blog" msgid_plural "Blogs" msgstr[0] "Blog" msgstr[1] "Blogak" # bare.tmpl 33 # export.tmpl 19 # admin.tmpl 60 # view-user 132 msgid "Post" msgid_plural "Posts" msgstr[0] "Post" msgstr[1] "Postak" # bare.tmpl 26 # header.tmpl 55 msgid "My Posts" msgstr "Nire postak" # classic.tmpl 38 # edit-meta.tmpl 43 # pad.tmpl 26,27,33 # post.tmpl 47 # base.tmpl 47 # bare.tmpl 26 # stats.tmpl 55 # import.tmpl 41 # articles.tmpl 25 # header.tmpl 21,56,64 # posts.tmpl 23,30,50,57 msgid "Draft" msgid_plural "Drafts" msgstr[0] "Zirriborro" msgstr[1] "Zirriborroak" # login.tmpl 27 # base.tmpl 50 # header.tmpl 59 msgid "Sign up" msgstr "Erregistratu" # classic.tmpl 5 # collection.tmpl 53 # pad.tmpl 5 # base.tmpl 55 # nav.tmpl 9 # header.tmpl 25,71 msgid "New Post" msgstr "Post berria" # header.tmpl 29 msgid "Return to editor" msgstr "Itzuli editorera" # footer.tmpl 10,14,34 # user/include/footer.tmpl 13 msgid "writer's guide" msgstr "idazlearen gida" # footer.tmpl 15,35 msgid "developers" msgstr "garatzaileak" # footer.tmpl 11,28 # user/include/footer.tmpl 14 msgid "privacy" msgstr "pribatutasuna" # footer.tmpl 16,36 msgid "source code" msgstr "iturburu kodea" # header.tmpl 9,35 msgid "Admin dashboard" msgstr "Administrazio-panela" # header.tmpl 10,36 msgid "Account settings" msgstr "Kontuaren ezarpenak" # import.tmpl 17 # header.tmpl 11,37 msgid "Import posts" msgstr "Postak inportatu" # base.tmpl 30 # export.tmpl 5,10 # header.tmpl 12,38 msgid "Export" msgstr "Exportatu" # header.tmpl 103 msgid "Dashboard" msgstr "Aginte-panela" # header.tmpl 104 msgid "Settings" msgstr "Ezarpenak" # export.tmpl 19 # admin.tmpl 58 # header.tmpl 106 # view-user.tmpl 59 # users.tmpl 15,21,30 msgid "User" msgid_plural "Users" msgstr[0] "Erabiltzaile" msgstr[1] "Erabiltzaileak" # header.tmpl 107 # pages.tmpl 13, 17 msgid "Page" msgid_plural "Pages" msgstr[0] "Orria" msgstr[1] "Orriak" # post.tmpl 41 # posts.tmpl 11,43,64,66 # view-user 128 msgid "View" msgid_plural "Views" msgstr[0] "Ikustaldi" msgstr[1] "Ikustaldiak" # posts.tmpl 11,43,64,66 # view-user 128 # edit-meta.tmpl 49,55 # pad.tmpl 63 msgid "View post" msgid_plural "View posts" msgstr[0] "Posta ikusi" msgstr[1] "Postak ikusi" # classic.tmpl 41,45 # collection.tmpl 57 # header.tmpl 7 # edit-meta.tmpl 41 # pad.tmpl 24,36,40 # nav.tmpl 12 msgid "View Blog" msgid_plural "View Blogs" msgstr[0] "Bloga Ikusi" msgstr[1] "Blogak Ikusi" # classic.tmpl 62 # pad.tmpl 124 msgid "word" msgid_plural "words" msgstr[0] "hitz" msgstr[1] "hitzak" # pad.tmpl 64 msgid "Publish" msgstr "Argitaratu" # pad.tmpl 20 # bare.tmpl 20 msgid "This post has been updated elsewhere since you last published!" msgstr "Post hau beste nonbait eguneratua izan da argitaratuz geroztik!" # pad.tmpl 20 # bare.tmpl 20 msgid "Delete draft and reload" msgstr "Zirriborroa ezabatu eta birkargatu" msgid "Updates" msgstr "Eguneraketak" # classic.tmpl 42 # pad.tmpl 37 # user/collection.tmpl 32 # collection.tmpl 54 # nav.tmpl 10 # header.tmpl 19 msgid "Customize" msgstr "Pertsonalizatu" # classic.tmpl 43 # collection.tmpl 55 # pad.tmpl 38 # stats.tmpl 26 # nav.tmpl 11 # header.tmpl 20 msgid "Stats" msgstr "Estatistikak" # classic.tmpl 47 # collection.tmpl 58 # pad.tmpl 42 msgid "View Draft" msgid_plural "View Drafts" msgstr[0] "Zirriborroa Ikusi" msgstr[1] "Zirriborroak Ikusi" # header.tmpl 111 #, fuzzy msgid "Monitor" msgstr "Monitor" # read.tmpl 108,110 msgid "Read more..." msgstr "Irakurri gehiago..." # silenced.tmpl 3 msgid "Your account has been silenced." msgstr "Zure kontua isilarazia izan da." # silenced.tmpl 3 msgid "" "You can still access all of your posts and blogs, but no one else can " "currently see them." msgstr "Oraindik zure blog eta postak ikus ditzakezu, baina ez beste inork." # articles.tmpl 28 msgid "" "These are your draft posts. You can share them individually (without a blog) " "or move them to your blog when you're ready." msgstr "" "Hauek zure zirriborroak dira. Bakarka partekatu ahal izango dituzu (blogik " "gabe), edo prest dituzunean blogera mugitu eta argitaratu." # articles.tmpl 57 msgid "" "Your anonymous and draft posts will show up here once you've published some. " "You'll be able to share them individually (without a blog) or move them to a " "blog when you're ready." msgstr "" "Zure zirriborro eta sarrera anonimoak hemen agertuko dira. Bakarka partekatu " "ahal izango dituzu (blogik gabe), edo prest dituzunean blogera mugitu eta " "argitaratu." # articles.tmpl 58 msgid "Alternatively, see your blogs and their posts on your %s page." msgstr "Bestela, blogak eta argitalpenak ikusi ditzakezu %s orrian." # articles.tmpl 60 msgid "Start writing" msgstr "Idazten hasi" # articles.tmpl 64 # static/js/postactions.js #, fuzzy msgid "unsynced posts" msgstr "argitaratu gabeko posta" # articles.tmpl 64 # collection.tmpl 43 # view-page.tmpl 51 # view-user 116 msgid "Title" msgstr "Izenburua" # collection.tmpl 44 # view-user 120 msgid "Description" msgstr "Deskribapena" # collection.tmpl 50 msgid "This blog uses your username in its URL." msgstr "Blog honek zure erabiltzaile izena darabil bere URL-an." # collection.tmpl 50 msgid "This blog uses your username in its URL and fediverse handle." msgstr "" "Blog honek zure erabiltzaile izena darabil bere URL-an eta fedibertsoaren " "kudeaketan." # collection.tmpl 50 msgid "You can change it in your %s." msgstr "Hori %s atalean alda dezakezu." # collection.tmpl 63 msgid "Publicity" msgstr "Publikotasuna" # collection.tmpl 68 # app-settings.tmpl 120 #, fuzzy msgid "Unlisted" msgstr "Irekia" # user/collection.tmpl 87 # app-settings.tmpl 121 msgid "Public" msgstr "Publikoa" # user/collection.tmpl 74 # app-settings.tmpl 122 msgid "Private" msgstr "Pribatua" # user/collection.tmpl 70 msgid "This blog is visible to any registered user on this instance." msgstr "" "Blog hau instantzia honetan erregistraturiko edonorentzat dago ikusgai." # user/collection.tmpl 70 msgid "This blog is visible to anyone with its link." msgstr "Blog hau bere esteka duen edonorentzat dago ikusgai." # user/collection.tmpl 76 msgid "Only you may read this blog (while you're logged in)." msgstr "Zuk bakarrik irakur dezakezu blog hau (saioa hasita duzun bitartean)." # user/collection.tmpl 80 msgid "Password-protected:" msgstr "Pasahitzez-babestua:" # user/collection.tmpl 80 msgid "a memorable password" msgstr "pasahitz gogoangarri bat" # user/collection.tmpl 82 msgid "A password is required to read this blog." msgstr "Pasahitza behar da blog hau irakurtzeko." # user/collection.tmpl 89 msgid "" "This blog is displayed on the public %s, and is visible to anyone with its " "link." msgstr "" "Blog hau %s atal publikoan bistaratzen da, eta esteka ezagutzen duen " "edonorentzat dago ikusgai." # user/collection.tmpl 89 msgid "" "This blog is displayed on the public %s, and is visible to any registered " "user on this instance." msgstr "" "Blog hau %s atal publikoan bistaratzen da, eta instantzia honetan " "erregistraturiko edonorentzat dago ikusgai." # user/collection.tmpl 90 msgid "The public reader is currently turned off for this community." msgstr "" "Irakurlea atal publikoa desgaituta dago une honetan komunitate honentzat." # user/collection.tmpl 98 msgid "Display Format" msgstr "Bistaratzea" # user/collection.tmpl 100 msgid "Customize how your posts display on your page." msgstr "Pertsonalizatu zure postak zure orrian bistaratzeko modua." # user/collection.tmpl 107 msgid "Dates are shown. Latest posts listed first." msgstr "Datak erakusten dira. Post berrienak zerrendan lehenak." # user/collection.tmpl 113 msgid "No dates shown. Oldest posts first." msgstr "Datarik ez da erakusten. Post zaharrenak zerrendan lehenak." # user/collection.tmpl 119 msgid "No dates shown. Latest posts first." msgstr "Datarik ez da erakusten. Post berrienak lehenak." # user/collection.tmpl 126 msgid "Text Rendering" msgstr "Testu Errendatzea" # user/collection.tmpl 128 msgid "Customize how plain text renders on your blog." msgstr "Pertsonalizatu testu-laua zure blogean errendatzeko modua." # user/collection.tmpl 145 msgid "Custom CSS" msgstr "CSS pertsonalizazioa" # user/collection.tmpl 148 msgid "customization" msgstr "pertsonalizazio" # user/collection.tmpl 148 msgid "See our guide on %s." msgstr "Ikusi gure %s gida." # user/collection.tmpl 153 msgid "Post Signature" msgstr "Post Sinadura" # user/collection.tmpl 155 msgid "" "This content will be added to the end of every post on this blog, as if it " "were part of the post itself. Markdown, HTML, and shortcodes are allowed." msgstr "" "Eduki hau blog honetako post bakoitzaren amaieran gehituko da, postarena " "balitz bezala. Markdown, HTML, eta azpikodeak onartzen dira." # user/collection.tmpl 162 msgid "Web Monetization" msgstr "Web Monetizazioa" # user/collection.tmpl 164 msgid "" "Web Monetization enables you to receive micropayments from readers that have " "a %s. Add your payment pointer to enable Web Monetization on your blog." msgstr "" "Web Monetizazioak mikro-ordainketak jasotzeko aukera eskaintzen dizu %s " "duten irakurleengandik. Gehitu zure ordainketa datuak Web Monetizazioa zure " "blogean gaitzeko." # user/collection.tmpl 164 msgid "Coil membership" msgstr "Coil kontua" # edit-meta.tmpl 263 # settings.tmpl 81 # user/collection.tmpl 171 msgid "Save changes" msgstr "Gorde aldaketak" # user/collection.tmpl 173 msgid "Delete Blog..." msgstr "Bloga ezabatu..." # user/collection.tmpl 190,220 # articles.tmpl 36 # posts.tmpl 19,46 msgid "Delete" msgstr "Ezabatu" # settings.tmpl 187 # user/collection.tmpl 189 # view-user 173 msgid "Cancel" msgstr "Utzi" # user/collection.tmpl 180 msgid "Are you sure you want to delete this blog?" msgstr "Ziur al zaude blog hau ezabatu nahi duzula?" # posts.js 46,147 # collection.tmpl 148 # collection-tags.tmpl 96 # chorus-collection.tmpl 132 msgid "Are you sure you want to delete this post?" msgstr "Ziur al zaude post hau ezabatu nahi duzula?" # posts.js 302 # collection.tmpl 175,226 # collection-tags.tmpl 123,174 # chorus-collection.tmpl 159,210 msgid "" "Post is synced to another account. Delete the post from that account instead." msgstr "" "Posta beste kontu batekin sinkronizatzen da. Ezaba ezazu kontu horretako " "posta." # posts.js 308 # collection.tmpl 181 # collection-tags.tmpl 129 # chorus-collection.tmpl 165 msgid "Failed to delete." msgstr "Ezabatzeak huts egin du." # posts.js 308 # collection.tmpl 181 # collection-tags.tmpl 129 # chorus-collection.tmpl 165 msgid "Please try again." msgstr "Saia zaitez berriro." # user/collection.tmpl 182 msgid "" "This will permanently erase **%s** (%s/%s) from the internet. Any posts on " "this blog will be saved and made into drafts (found on your %s page)." msgstr "" "Honek **%s** (%s/%s) betirako ezabatuko du internetetik. Blog honetako post " "guztiak %s orrira igaroko dira." # user/collection.tmpl 183 msgid "" "If you're sure you want to delete this blog, enter its name in the box below " "and press **%s**." msgstr "" "Blog hau ezabatu nahi duzula ziur bazaude, sartu bere izena beheko eremuan " "eta sakatu **%s**." # user/collection.tmpl 202 msgid "Enter **%s** in the box below." msgstr "Sartu **%s** beheko eremuan." # collection.tmpl 238 msgid "Saving changes..." msgstr "Aldaketak gordetzen..." # collections.tmpl 72,75,84 msgid "This name is taken." msgstr "Izen hori erabilita dago." # pad.tmpl 61 msgid "Edit post metadata" msgstr "Metadatuak editatu" # edit-meta.tmpl 5,55 msgid "Edit metadata" msgstr "Metadatuak editatu" # edit-meta.tmpl 260 msgid "now" msgstr "orain" # edit-meta.tmpl 63 msgid "Slug" msgstr "Sluga" # edit-meta.tmpl 66 msgid "Language" msgstr "Hizkuntza" # edit-meta.tmpl 256 msgid "Direction" msgstr "Norabidea" # edit-meta.tmpl 258 msgid "Created" msgstr "Sortze data" # edit-meta.tmpl 257 msgid "right-to-left" msgstr "eskuinetik-ezkerrera" # edit-meta.tmpl 47 msgid "Edit post" msgstr "Posta editatu" # edit-meta.tmpl 48 # pad.tmpl 6 msgid "Toggle theme" msgstr "Gaia aldatu" # collection-post.tmpl 66 # posts.tmpl 8 msgid "Scheduled" msgstr "Programatua" # collection-post.tmpl 57 # post.tmpl 45,91 # articles.tmpl 35 # posts.tmpl 17,44 msgid "Edit" msgstr "Editatu" # posts.tmpl 18,45 msgid "Pin" msgstr "Finkatu" # collection-post.tmpl 58 msgid "Unpin" msgstr "Askatu" # posts.tmpl 21,48 msgid "Move this post to another blog" msgstr "Mugitu post hau beste blog batetara" # posts.tmpl 30,57 msgid "Change to a draft" msgstr "Eraman zirriborroetara" # posts.tmpl 30,57 msgid "change to _%s_" msgstr "bihurtu _%s_" # articles.tmpl 43,78 # posts.tmpl 26,53 msgid "move to..." msgstr "mugi hona..." # articles.tmpl 47,83 msgid "move to %s" msgstr "eraman %s-ra" # post.tmpl 42 msgid "View raw" msgstr "Raw-eran ikusi" # articles.tmpl 47,83 msgid "Publish this post to your blog %s" msgstr "Argitaratu post hau zure %s blogean" # articles.tmpl 39,74 msgid "Move this post to one of your blogs" msgstr "Mugitu post hau zure blogetako batetara" # articles.tmpl 55 msgid "Load more..." msgstr "Kargatu gehiago..." # stats.tmpl 32 msgid "Stats for all time." msgstr "Estatistika orokorrak." # stats.tmpl 35 msgid "Fediverse stats" msgstr "Fedibertsoko estatistikak" # stats.tmpl 38 msgid "Followers" msgstr "Jarraitzaileak" # stats.tmpl 46 msgid "Top %d post" msgid_plural "Top %d posts" msgstr[0] "%d. posta" msgstr[1] "Lehen %d postak" # stats.tmpl 51 msgid "Total Views" msgstr "Bistaratzeak" # settings.tmpl 27 msgid "Before you go..." msgstr "Joan aurretik..." # settings.tmpl 27 msgid "Account Settings" msgstr "Kontuaren Ezarpenak" # settings.tmpl 38 msgid "Change your account settings here." msgstr "Aldatu hemen zure kontuaren ezarpenak." # signup.tmpl 80 # signup-oauth.tmpl 85,87 # login.tmpl 21 # landing.tmpl 92 # settings.tmpl 43 # view-user.tmpl 62 msgid "Username" msgstr "Erabiltzaile-izena" # settings.tmpl 46 msgid "Update" msgstr "Eguneratu" # settings.tmpl 56 msgid "Passphrase" msgstr "Pasaesaldia" # settings.tmpl 58 msgid "Add a passphrase to easily log in to your account." msgstr "Gehitu pasaesaldia saioa erraztasunez hasteko." # settings.tmpl 59,60 msgid "Current passphrase" msgstr "Uneko pasaesaldia" # settings.tmpl 61,64 msgid "New passphrase" msgstr "Pasaesaldi berria" # settings.tmpl 60,64 msgid "Show" msgstr "Erakutsi" msgid "Account updated." msgstr "Kontua eguneratu da." # signup.tmpl 91 # signup-oauth.tmpl 92,94 # landing.tmpl 103 # settings.tmpl 69 msgid "Email" msgstr "Emaila" # settings.tmpl 76 msgid "Email address" msgstr "Email helbidea" # settings.tmpl 71 msgid "Add your email to get:" msgstr "Gehitu zure emaila hauek eskuratzeko:" # settings.tmpl 34 msgid "Please add an **%s** and/or **%s** so you can log in again later." msgstr "Mesedez gehitu saioa hasteko erabiliko dituzun **%s** edo/eta **%s**." # settings.tmpl 73 msgid "No-passphrase login" msgstr "Pasaesaldi gabeko saio hasiera" # settings.tmpl 74 msgid "Account recovery if you forget your passphrase" msgstr "Kontu berreskuratzea pasaesaldia ahaztuz gero" # settings.tmpl 89 msgid "Linked Accounts" msgstr "Lotutako Kontuak" # settings.tmpl 90 msgid "These are your linked external accounts." msgstr "Hauek dira lotutako zure kanpo-kontuak." # settings.tmpl 114 msgid "Link External Accounts" msgstr "Kanpoko Kontuak Lotu" msgid "" "Connect additional accounts to enable logging in with those providers, " "instead of using your username and password." msgstr "" "Konektatu kontu gehigarriak hornitzaile horiekin saioa hasteko, zure " "erabiltzaile-izena eta pasahitza erabili beharrean." # settings.tmpl 162 # view-user 149 msgid "Incinerator" msgstr "Errauskailua" # settings.tmpl 166,169,188 msgid "Delete your account" msgstr "Ezabatu zure kontua" # settings.tmpl 167 msgid "Permanently erase all your data, with no way to recover it." msgstr "Ezabatu zure datu guztiak, berreskuratzeko modurik gabe." # settings.tmpl 176 # view-user 163 msgid "Are you sure?" msgstr "Ziur al zaude?" # settings.tmpl 178 msgid "export your data" msgstr "zure datuak esportatu" # settings.tmpl 178 msgid "" "This action **cannot** be undone. It will immediately and permanently erase " "your account, including your blogs and posts. Before continuing, you might " "want to %s." msgstr "" "Ekintza hau **ezin da** desegin. Honek berehala eta betirako ezabatuko du " "zure kontua, blogak eta argitalpenak barne. Jarraitu aurretik agian %s nahi " "zenituzke." # settings.tmpl 179 msgid "If you're sure, please type **%s** to confirm." msgstr "Ziur baldin bazaude, idatzi **%s** berresteko." # invite-help.tmpl 13 msgid "Invite to %s" msgstr "%s gonbidatu" # invite-help.tmpl 15 msgid "This invite link is expired." msgstr "Esteka hau iraungita dago." # invite-help.tmpl 21 msgid "Only **one** user" msgstr "Erabiltzaile **bakarrak**" # invite-help.tmpl 21 msgid "Up to **%d** users" msgstr "**%d** erabiltzaileko kopuruak" # invite-help.tmpl 21 msgid "can sign up with this link." msgstr "hasi dezake saioa esteka honekin." # invite-help.tmpl 23 msgid "It expires on **%s**." msgstr "Iraungitze data: **%s**." # invite-help.tmpl 25 msgid "It can be used as many times as you like" msgstr "Nahi duzun adina aldiz erabili daiteke" # invite-help 25 msgid "before **%s**, when it expires" msgstr "**%s** baino lehen, iraungitzen denean alegia" msgid "person has" msgid_plural "person have" msgstr[0] "pertsonak" msgstr[1] "pertsonek" # invite-help.tmpl 21 msgid "So far, **%d** %s used it." msgstr "Orain arte, **%d** %s erabili dute." # invite-help.tmpl 21 # So far, {{.Invite.Uses}} {{pluralize "person has" "people have" .Invite.Uses}} used it. # invite-help.tmpl 21 # invite-help.tmpl 17 msgid "" "Copy the link below and send it to anyone that you want to join *%s*. You " "could paste it into an email, instant message, text message, or write it " "down on paper. Anyone who navigates to this special page will be able to " "create an account." msgstr "" "Kopiatu ondorengo esteka eta *%s* gunera batzea nahi duzun lagunari bidali. " "Email batean erantsiz bidal dezakezu, mezularitza zerbitzu baten bidez, " "testu-mezu moduan edo paper zati batean idatziz. Helbide berezi honetara " "nabigatzen duen edonork izango du kontu bat sortzeko aukera." # IMPORT PAGE # import.tmpl 28 msgid "" "Publish plain text or Markdown files to your account by uploading them below." msgstr "Argitaratu testu-lau edo Markdown fitxategiak zure kontura igoaz." # import.tmpl 31 msgid "Select some files to import:" msgstr "Hautatu fitxategiak inportatzeko:" # import.tmpl 36 msgid "Import these posts to:" msgstr "Inportatu postak hona:" # import.tmpl 59 msgid "Import" msgstr "Inportatu" msgid "Import complete, %d post imported." msgid_plural "Import complete, %d posts imported." msgstr[0] "Import complete, %d post imported." msgstr[1] "Import complete, %d posts imported." msgid "%d of %d posts imported, see details below." msgid_plural "%d of %d posts imported, see details below." msgstr[0] "%d of %d posts imported, see details below." msgstr[1] "%d of %d posts imported, see details below." msgid "%s is not a supported post file" msgstr "%s post fitxategia ez da onartzen" # export.tmpl 6 msgid "" "Your data on %s is always free. Download and back-up your work any time." msgstr "" "Zure datuen biltegiratzea doanekoa da %s webgunean. Deskargatu eta egin zure " "lanen babeskopia edonoiz." # export.tmpl 11 msgid "Format" msgstr "Formatua" # header.tmpl 101 msgid "Admin" msgstr "Admin" # app-settings.tmpl 37 msgid "Site Title" msgstr "Gunearen Izenburua" # app-settings.tmpl 38 msgid "Your public site name." msgstr "Gune publikoaren izena." # app-settings.tmpl 44 msgid "Site Description" msgstr "Gunearen Deskribapena" # app-settings.tmpl 45 msgid "Describe your site — this shows in your site's metadata." msgstr "Deskribatu zure gunea — hau gunearen metadatuetan erakutsiko da." # app-settings.tmpl 51 msgid "Host" msgstr "Host" # app-settings.tmpl 52 msgid "" "The public address where users will access your site, starting with `http://" "` or `https://`." msgstr "" "Erabiltzaileek gunean sartzeko erabiliko duten helbidea, hasieran `http://` " "edo `https://` protokoloa zehaztuz." # app-settings.tmpl 58 msgid "Community Mode" msgstr "Komunitate Modua" # app-settings.tmpl 59 msgid "Whether your site is made for one person or many." msgstr "Zure gunea pertsona bakarrarentzat edo askorentzat egina dagoen." # app-settings.tmpl 61 msgid "Single user" msgstr "Erabiltzaile bakarra" # app-settings.tmpl 61 msgid "Multiple users" msgstr "Erabiltzaile anitz" # app-settings.tmpl 65 msgid "Landing Page" msgstr "Helburu-orria" # app-settings.tmpl 66 msgid "" "The page that logged-out visitors will see first. This should be an absolute " "path like: `/read`." msgstr "" "Saioa hasi gabe duten erabiltzaileek hasieran ikusiko duten orria. Honen " "moduko bide absolutua izan beharko litzateke: `/read`." # app-settings.tmpl 72 msgid "Open Registrations" msgstr "Erregistro Irekia" # app-settings.tmpl 73 msgid "Allow anyone who visits the site to create an account." msgstr "Gunea bisitatzen duen edonori kontua sortzen utzi." # app-settings.tmpl 80 msgid "Allow account deletion" msgstr "Kontua ezabatzen utzi" # app-settings.tmpl 81 msgid "" "Allow all users to delete their account. Admins can always delete users." msgstr "" "Erabiltzaileei beraien kontua ezabatzen utzi. Administratzaileek beti " "ezabatu ditzakete erabiltzaileak." # app-settings.tmpl 88 msgid "Allow invitations from..." msgstr "Gonbidapen onarpena" # app-settings.tmpl 89 msgid "Choose who is allowed to invite new people." msgstr "Zehaztu nor dagoen baimenduta jende berria gonbidatzera." # app-settings.tmpl 93 msgid "No one" msgstr "Inor ez" # app-settings.tmpl 94 msgid "Only Admins" msgstr "Admin-ak soilik" # app-settings.tmpl 95 msgid "All Users" msgstr "Erabiltzaile oro" # app-settings.tmpl 101 msgid "Private Instance" msgstr "Instantzia Pribatua" # app-settings.tmpl 102 msgid "Limit site access to people with an account." msgstr "Sarbidea mugatu kontua duten erabiltzaileei." # app-settings.tmpl 109 msgid "Show a feed of user posts for anyone who chooses to share there." msgstr "" "Erabiltzailearen argitalpenen feed bat erakutsi bertan elkarbanatzea " "aukeratzen duen edonorentzat." # app-settings.tmpl 115 msgid "Default blog visibility" msgstr "Blogaren ikusgarritasuna" # app-settings.tmpl 116 msgid "The default setting for new accounts and blogs." msgstr "Kontu eta blog berrientzako lehenetsitako ezarpena." # app-settings.tmpl 128 msgid "Maximum Blogs per User" msgstr "Blog Kopurua Erabiltzaileko" # app-settings.tmpl 129 msgid "" "Keep things simple by setting this to **1**, unlimited by setting to **0**, " "or pick another amount." msgstr "" "Guztia modu sinplean mantentzeko sartu **1**, mugagabea **0** ezarriz, " "bestela gogoko kopurua zehaztu dezakezu." # app-settings.tmpl 135 msgid "Federation" msgstr "Federazioa" # app-settings.tmpl 136 msgid "" "Enable accounts on this site to propagate their posts via the ActivityPub " "protocol." msgstr "" "Gaitu gune honetako kontuek ActivityPub protokolo bidez postak zabaldu " "ditzaten." # app-settings.tmpl 142 msgid "Public Stats" msgstr "Estatistika Publikoak" # app-settings.tmpl 143 msgid "Publicly display the number of users and posts on your **%s** page." msgstr "Erakutsi publikoki erabiltzaile eta post kopurua **%s** orrian." # app-settings.tmpl 149 msgid "Monetization" msgstr "Monetizazioa" # app-settings.tmpl 150 msgid "Enable blogs on this site to receive micropayments from readers via %s." msgstr "" "Gaitu gune honetako blogak irakurleengandik mikro-ordainketak jaso ditzaten, " "%s-en bidez." # app-settings.tmpl 156 msgid "Minimum Username Length" msgstr "Erabiltzaile-izenaren gutxieneko luzera" # app-settings.tmpl 157 msgid "" "The minimum number of characters allowed in a username. (Recommended: 2 or " "more.)" msgstr "" "Erabiltzaile-izenean onarturiko gutxieneko karaktere kopurua. (Gomendatua: 2 " "edo gehiago.)" # app-settings.tmpl 162 msgid "Save Settings" msgstr "Gorde Ezarpenak" # app-settings.tmpl 166 msgid "configuration docs" msgstr "konfiguraketa dokumentuetan" # app-settings.tmpl 166 msgid "Still have questions? Read more details in the %s." msgstr "Zalantzak dituzu oraindik? Irakurri xehetasun gehiago %s." msgid "Configuration saved." msgstr "Konfiguraketa gorde da." # view-user.tmpl 66 # users.tmpl 22 msgid "joined" msgstr "elkartua" # users.tmpl 23 msgid "type" msgstr "mota" # users.tmpl 24 # view-user.tmpl 79 msgid "status" msgstr "egoera" # base.tmpl 31 # header.tmpl 39 # invite.tmpl 26 # users.tmpl 16 msgid "Invite people" msgstr "Jendea gonbidatu" # invite.tmpl 27 msgid "" "Invite others to join *%s* by generating and sharing invite links below." msgstr "" "Gonbidatu lagunen bat *%s* gunera batu dadin gonbidapen esteka bat sortu eta " "berarekin elkarbanatuz." # invite.tmpl 31 msgid "Maximum number of uses:" msgstr "Gehienezko erabilera kopurua:" # invite.tmpl 33 msgid "No limit" msgstr "Mugagabea" # invite.tmpl 34,35,36,37,38,39,64 msgid "use" msgid_plural "uses" msgstr[0] "use" msgstr[1] "uses" # invite.tmpl 43 msgid "Expire after:" msgstr "Iraungitze data:" # invite.tmpl 46 msgid "minute" msgid_plural "minutes" msgstr[0] "minute" msgstr[1] "minutes" # invite.tmpl 47,48,49 msgid "hour" msgid_plural "hours" msgstr[0] "hour" msgstr[1] "hours" # invite.tmpl 50,51 msgid "day" msgid_plural "days" msgstr[0] "day" msgstr[1] "days" # invite.tmpl 52 msgid "week" msgid_plural "weeks" msgstr[0] "week" msgstr[1] "weeks" # invite.tmpl 57 msgid "You cannot generate invites while your account is silenced." msgstr "" "Ezin duzu gonbidapenik sortu zure kontua isilarazirik dagoen bitartean." # invite.tmpl 57 msgid "Generate" msgstr "Sortu" # invite.tmpl 63 msgid "Link" msgstr "Lotura" # invite.tmpl 121,129,137,145,152 msgid "ToLink" msgstr "Lotu" # invite.tmpl 65 msgid "Expires" msgstr "Iraungitzea" # invite.tmpl 71 msgid "Expired" msgstr "Iraungita" # invite.tmpl 75 msgid "No invites generated yet." msgstr "Oraindik ez da gonbidapenik sortu." # pages.tmpl 18 msgid "last modified" msgstr "azken aldaketa" # view-user.tmpl 85 msgid "Active" msgstr "Aktibo" # view-user.tmpl 82 msgid "Silenced" msgstr "Isilarazia" # view-user.tmpl 83 msgid "Unsilence" msgstr "Ez-isilarazi" # view-user 86 msgid "disabled" msgstr "desgaitua" # view-user 86 msgid "Silence" msgstr "Isilarazi" # view-user.tmpl 54 msgid "No." msgstr "Zkia." # view-user.tmpl 70 msgid "total posts" msgstr "postak guztira" # view-user.tmpl 74,136 msgid "last post" msgstr "azken posta" # signup.tmpl 87 # login.tmpl 22 # landing.tmpl 99 # view-user 92 msgid "password" msgstr "pasahitza" msgid "Change your password" msgstr "Aldatu zure pasahitza" # view-user 100 msgid "Go to reset password page" msgstr "Pasahitza berrezartzeko orrira joan" # view-user 141 msgid "Fediverse followers" msgstr "Fedibertsoko jarraitzaileak" # view-user 124 msgid "Visibility" msgstr "Ikusgarritasuna" # view-user 112 msgid "Alias" msgstr "Ezizena" # view-user.tmpl 75,137 msgid "Never" msgstr "Inoiz ez" # view-user 97 msgid "Reset" msgstr "Berrezarri" # view-user 153,156,174 msgid "Delete this user" msgstr "Erabiltzailea ezabatu" # view-user 154 msgid "Permanently erase all user data, with no way to recover it." msgstr "" "Betiko ezabatu erabiltzailearen datu guztiak, berreskuratzeko aukerarik gabe." # view-user 165 msgid "" "This action **cannot**be undone. It will permanently erase all traces of " "this user, **%s**, including their account information, blogs, and posts." msgstr "" "Ekintza hau **ezingo da** desegin. Betiko ezabatuko ditu erabiltzaile honen " "aztarna guztiak, **%s**, bere kontuaren informazioa barne, blogak, eta " "postak." # view-user 166 msgid "Please type **%s** to confirm." msgstr "Mesedez idatzi **%s** baieztatzeko." # view-user 202 msgid "" "Silence this user? They'll still be able to log in and access their posts, " "but no one else will be able to see them anymore. You can reverse this " "decision at any time." msgstr "" "Erabiltzailea isilarazi? Isilarazitako erabiltzaileek sarbidea izaten " "jarraituko dute beraien idatzietara, baina ez ditu inork ikusiko. Erabaki " "hau edozein unetan alda dezakezu." # view-user 208 msgid "" "Reset this user's password? This will generate a new temporary password that " "you'll need to share with them, and invalidate their old one." msgstr "" "Erabiltzailearen pasahitza berrezarri? Honek aldi baterako pasahitz berri " "bat sortuko du, beraiekin partekatu beharko duzuna eta zaharra baliogabetu." # settings.tmpl 225 # collection.tmpl 207 # view-user.tmpl 198 msgid "Deleting..." msgstr "Ezabatzen..." # view-user.tmpl 46 msgid "This user's password has been reset to:" msgstr "Erabiltzaile honen pasahitza hona berrezarri da:" # view-user.tmpl 48 msgid "" "They can use this new password to log in to their account. **This will only " "be shown once**, so be sure to copy it and send it to them now." msgstr "" "Pasahitz berri hau kontuan saio hasteko erabili ahal izango da. **Behin " "bakarrik erakutsiko da**, beraz, ziurtatu kopiatu eta bidaltzeaz." # view-user.tmpl 49 msgid "Their email address is:" msgstr "Email helbidea:" # app-updates.tmlp 19 msgid "Automated update check failed." msgstr "Eguneratze automatizatuaren egiaztatzeak huts egin du." # app-updates.tmlp 20, 24, 41 msgid "Installed version: %s (%s)." msgstr "Instalaturiko bertsioa: %s (%s)." # app-updates.tmlp 21, 42 msgid "Learn about latest releases on the %s or %s." msgstr "Ezagutu azken bertsioen inguruan %s-ean edo %s-ean." # app-updates.tmlp 23 msgid "WriteFreely is **up to date**." msgstr "WriteFreely **eguneratuta** dago." # app-updates.tmlp 27 msgid "Get" msgstr "Lortu" # app-updates.tmlp 27 msgid "A new version of WriteFreely is available! **%s %s**" msgstr "WriteFreely bertsio berri bat dago eskuragarri! **%s %s**" # app-updates.tmlp 28 msgid "release notes" msgstr "bertsio oharrak" # app-updates.tmlp 29 msgid "" "Read the %s for details on features, bug fixes, and notes on upgrading from " "your current version, **%s**." msgstr "" "Irakurri %s, **%s** bertsioaren ezaugarriei, akatsen zuzenketei eta " "eguneratze-oharrei buruzko xehetasunak ezagutzeko." # app-updates.tmlp 31 msgid "Check now" msgstr "Egiaztatu orain" # app-updates.tmlp 31 msgid "Last checked" msgstr "Azkenengoz egiaztatua" # app-updates.tmlp 40 msgid "Automated update checks are disabled." msgstr "Eguneratze-kontrol automatizatuak desgaituta daude." # ADMIN PAGES # view-page.tmpl 45 msgid "Banner" msgstr "Bannerra" # view-page.tmpl 56 msgid "Body" msgstr "Body" # view-page.tmpl 33 msgid "Outline your %s." msgstr "Azaldu zure %s." # view-page.tmpl 35,37 msgid "Customize your %s page." msgstr "Pertsonalizatu zure %s orria." # view-page.tmpl 31 msgid "Describe what your instance is %s." msgstr "Egin deskribapena instantzia %s." msgid "Accepts Markdown and HTML." msgstr "Markdown eta HTML erabili daitezke." # view-page.tmpl 56 msgid "Content" msgstr "Edukia" # view-page.tmpl 63 msgid "Save" msgstr "Gorde" # view-page.tmpl 71 msgid "Saving..." msgstr "Gordetzen..." # view-page.tmpl 48 msgid "" "We suggest a header (e.g. `# Welcome`), optionally followed by a small bit " "of text. Accepts Markdown and HTML." msgstr "" "Goiburu bat iradokitzen dugu (adib. ` # Ongi Etorri`), aukeran testu pixka " "batez jarraituz. Markdown eta HTML onartzen dira." # login.tmpl 11 msgid "Log in to %s" msgstr "Hasi saioa %s gunean" # login.tmpl 32 msgid "Logging in..." msgstr "Saioa hasten..." # login.tmpl 27 msgid "_No account yet?_ %s to start a blog." msgstr "_Konturik ez oraindik?_ %s blog bat hasteko." msgid "Incorrect password." msgstr "Pasahitz okerra." msgid "This user never set a password. Perhaps try logging in via OAuth?" msgstr "" "Erabiltzaile honek ez du pasahitzik ezarririk. Beharbada OAuth bidez saiatu?" msgid "" "This user never added a password or email address. Please contact us for " "help." msgstr "" "Erabiltzaile honek ez du inoiz pasahitz edo emailik gehitu. Jarri gurekin " "harremanetan laguntza jasotzeko." msgid "You're doing that too much." msgstr "Gehiegitan ari zara hori egiten." msgid "Parameter `alias` required." msgstr "Sartu erabiltzaile izena." msgid "A username is required." msgstr "Sartu erabiltzaile izena." msgid "Parameter `pass` required." msgstr "Sartu ezazu pasahitza." msgid "A password is required." msgstr "Pasahitza beharrezkoa da." msgid "Need a collection `alias` to read." msgstr "Bilduma `ezizen` bat behar da irakurtzeko." msgid "Please supply a password." msgstr "Mesedez sartu pasahitz bat." msgid "Something went very wrong. The humans have been alerted." msgstr "Zeozer oso gaizki atera da. Gizakiak jakinaren gain jarriko dira." msgid "Logging out failed. Try clearing cookies for this site, instead." msgstr "Irtetzeak huts egin du. Horren ordez, saia zaitez cookieak garbitzen." msgid "your-username" msgstr "zure-erabiltzaile-izena" msgid "optional" msgstr "hautazkoa" msgid "Create blog" msgstr "Sortu bloga" # signup-oauth.tmpl 59 msgid "Finish creating account" msgstr "Amaitu kontua sortzen" # signup-oauth.tmpl 79 msgid "Display Name" msgstr "Bistaratze izena" # oauth.tmpl 26 msgid "or" msgstr "edo" # oauth.tmpl 9,13,17,20 msgid "Sign in with **%s**" msgstr "Hasi saioa **%s**-ekin" # landing.tmpl 77 msgid "Learn more..." msgstr "Ikasi gehiago..." # landing.tmpl 114 msgid "Registration is currently closed." msgstr "Izen-ematea itxita dago une honetan." # landing.tmpl 115 msgid "another instance" msgstr "beste instantzia" # landing.tmpl 115 msgid "You can always sign up on %s." msgstr "Beti hasi ahal izango saioa %s batean." msgid "# Start your blog" msgstr "# Hasi zure bloga" msgid "# Start your blog in the fediverse" msgstr "# Hasi zure bloga fedibertsoan" +msgid "" +"## Join the Fediverse\n\nThe fediverse is a large network of platforms that all speak a common language. Imagine if you could reply to _Instagram_ posts from _Twitter_, or interact with your favorite _Medium_ blogs from _Facebook_ -- federated alternatives like %s, %s, and WriteFreely enable you to do these types of things.\n\n" +msgstr "" +"## Batu fedibertsora\n\nFedibertsoa plataforma desberdinek osatzen duten sare zabal bat da, non guztiek hizkuntza bera erabiltzen duten. Imajina ezazu _Twitter_-etik _Instagram_-eko sarrera bat erantzuteko aukera izango bazenu, edo _Facebook_-etik _Medium_ blog plataforman jardutekoa. %s, %s eta WriteFreely bezalako alternatibek horrelako gauzak egitea ahalbidetzen dute.\n\n" + msgid "" "## Write More Socially\n" "\n" "WriteFreely can communicate with other federated platforms like _Mastodon_, " "so people can follow your blogs, bookmark their favorite posts, and boost " "them to their followers. Sign up above to create a blog and join the " "fediverse." msgstr "" "## Idatzi sozialkiago\n" "\n" "WriteFreely _Mastodon_ bezalako beste edozein federatutako plataformarekin " "komunika daiteke, beraz jendeak zure bloga jarraitu ahal izango du, gogoko " "sarreren laster-markak egin, eta jarraitzaileekin elkarbanatu. Eman izena " "blog bat sortzeko eta batu fedibertsora." msgid "About %s" msgstr "%s-i buruz" msgid "_%s_ is a place for you to write and publish, powered by %s." msgstr "_%s_ idatzi eta argitaratzeko gune bat da, %s erabiliz." msgid "" "_%s_ is an interconnected place for you to write and publish, powered by %s." msgstr "_%s_ idatzi eta argitaratzeko gune bat da, %s erabiliz." -msgid "_%s_ is home to %d articles across %d blogs." -msgstr "_%s_ idatzi eta argitaratzeko gune bat da, %s erabiliz." +msgid "article" +msgid_plural "articles" +msgstr[0] "artikulu" +msgstr[1] "artikuluak" -msgid "" -"## About WriteFreely\n" -"\n" -"%s is a self-hosted, decentralized blogging platform for publishing " -"beautiful, simple blogs.\n" -"\n" -"It lets you publish a single blog, or host a community of writers who can " -"create multiple blogs under one account. You can also enable federation, " -"which allows people in the fediverse to follow your blog, bookmark your " -"posts, and share them with others." +msgid "_%s_ is home to **%d** %s across **%d** %s." +msgstr "_%s_ guneak **%d** %s ditu, eta **%d** %s." + +msgid "About WriteFreely" +msgstr "WriteFreely-ri buruz" + +msgid "%s is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs." +msgstr "%s blog eder eta sinpleak argitaratzeko norberak ostata dezakeen eta deszentralizaturikoa den blogintza plataforma bat da." + +msgid "It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others." msgstr "" -"## WriteFreely-ri buruz\n" -"\n" -"%s blog eder eta sinpleak argitaratzeko norberak ostata dezakeen eta " -"deszentralizaturikoa den blogintza plataforma bat da.\n" -"\n" "Blog bakar bat argitaratzeko aukera eskaintzen du, edo kontu bakarrean " "hainbat blog sor ditzakeen idazle komunitate bat ostatatzekoa. Federazioa " "ere gaitu daiteke, horrela, bertako pertsonek blogak jarraitu, posten laster-" "markak egin, eta besteekin partekatu ahal izango dituzte." msgid "Start an instance" msgstr "Hasi instantzia bat" msgid "Privacy Policy" msgstr "Pribatutasun Politika" msgid "Last updated" msgstr "Azken eguneraketa" msgid "Read the latest posts form %s." msgstr "Irakurri %s-en argitaratutako azken sarrerak." # : pages.go:98 msgid "" "%s, the software that powers this site, is built to enforce your right to " "privacy by default.\n" "\n" "It retains as little data about you as possible, not even requiring an email " "address to sign up. However, if you _do_ give us your email address, it is " "stored encrypted in our database.\n" "\n" "We salt and hash your account's password.We store log files, or data about " "what happens on our servers. We also use cookies to keep you logged in to " "your account.\n" "\n" "Beyond this, it's important that you trust whoever runs %s. Software can " "only do so much to protect you -- your level of privacy protections will " "ultimately fall on the humans that run this particular service." msgstr "" "Gune hau ahalbidetzen duen softwareak, hau da, %s-k zure pribatutasun " "eskubidea bermatzea lehenesten du.\n" "\n" "Instantzia honetan zuri buruzko ahalik eta datu gutxien gordetzen da, " "erregistratzeko helbide elektronikorik ere ez da behar, baina ematen " "badiguzu ere, enkriptaturik gordeko da gure datu-basean. Zure pasahitza " "berriz salt eta hash bidez babesten da.\n" "\n" "Log fitxategiak ere gordetzen ditugu, gure zerbitzarietan gertatzen dena, " "alegia. Zure kontuan saioa hasita izan dezazun cookieak ere erabiltzen " "ditugu.\n" "\n" "Horrez gain, garrantzitsua da %s kudeatzen ari dena zure konfidantzazko " "norbait izatea. Softwareak asko egin dezake zu babesteko, baina zure " "pribatutasunaren babes-maila, azken batean, zerbitzu hau kudeatzen duten " "pertsonena da." # static/js/postactions.js msgid "Unpublished post" msgstr "Argitaratu gabeko posta" msgid "Moved to %s" msgstr "%s-(e)ra mugitua" msgid "move to" msgstr "eraman" msgid "moving to %s..." msgstr "%s-(e)ra mugitzen..." msgid "unable to move" msgstr "ezinezkoa mugitzea" msgid "View on %s" msgstr "Ikusi %s-(e)n" # classic.tmpl 64 # pad.tmpl 59 # bare.tmpl 30 msgid "NOTE" msgstr "OHARRA" # classic.tmpl 64 # pad.tmpl 59 # bare.tmpl 30 msgid "for now, you'll need Javascript enabled to post." msgstr "oraingoz, Javascript gaiturik behar duzu postak idazteko." # classic.tmpl 158 # pad.tmpl 174 msgid "Your account is silenced, so you can't publish or update posts." msgstr "" "Zure kontua isilarazi egin da, beraz ezin duzu postik argitaratu edo " "eguneratu." # classic.tmpl 257 # pad.tmpl 278 msgid "Failed to post. Please try again." msgstr "Huts argitaratzerakoan. Saia zaitez berriro." # classic.tmpl 163 # pad.tmpl 179 # bare.tmpl 99 msgid "You don't have permission to update this post." msgstr "Ez duzu baimenik post hau eguneratzeko." # pad.tmpl 16 msgid "Write..." msgstr "Idatzi..." # classic.tmpl 34 # pad.tmpl 29 msgid "Publish to..." msgstr "Argitaratu..." # classic.tmpl 55 # pad.tmpl 50 msgid "Font" msgstr "Letra-tipoa" # read.tmpl 105 msgid "from" msgstr "from" # read.tmpl 105 msgid "Anonymous" msgstr "Anonimoa" # read.tmpl 120 msgid "Older" msgstr "Zaharragoa" # read.tmpl 121 msgid "Newer" msgstr "Berriagoa" # password-collection.tmpl 31 msgid "Menu" msgstr "Menu" # password-collection.tmpl 51 msgid "This blog requires a password." msgstr "Blog honek pasahitza behar du." # 404-general.tmpl 1 msgid "Page not found" msgstr "Page not found" # 404-general.tmpl 4 msgid "This page is missing." msgstr "Orri hori falta da." # 404-general.tmpl 5 msgid "Are you sure it was ever here?" msgstr "Ziur al zaude hemen dagoela?" #404.tmpl 1,4 msgid "Post not found" msgstr "Ez da aurkitu posta" #404.tmpl msgid "Why not share a thought of your own?" msgstr "Zergatik ez partekatu norberaren pentsamenduak?" # 404.tmpl msgid "Start a blog" msgstr "Hasi blog bat" #404.tmpl msgid "%s and spread your ideas on **%s**, %s." msgstr "%s eta adierazi zure ideiak **%s** gunean, %s." # 404.tmpl msgid "a simple blogging community" msgstr "blogintza komunitate sinplea" # 404.tmpl msgid "a simple, federated blogging community" msgstr "federaturiko blogintza komunitate sinplea" # 410.tmpl 1 msgid "Unpublished" msgst "Argitaratu gabea" # 410.tmpl 4 msgid "Post was unpublished by the author." msgstr "Egileak posta ezabatu du." # 410.tmpl 5 msgid "It might be back some day." -msgstr "Agian itzuliko da egunen batean." \ No newline at end of file +msgstr "Agian itzuliko da egunen batean." + +# errors.go +msgid "User doesn't exist." +msgstr "Erabiltzailea ez da existitzen." \ No newline at end of file diff --git a/pages.go b/pages.go index 8b3a987..efa0fbf 100644 --- a/pages.go +++ b/pages.go @@ -1,164 +1,176 @@ /* * Copyright © 2018-2019, 2021 Musing Studio LLC. * * This file is part of WriteFreely. * * WriteFreely is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, included * in the LICENSE file in this source code package. */ package writefreely import ( "database/sql" "github.com/writefreely/writefreely/config" "time" ) var defaultPageUpdatedTime = time.Date(2018, 11, 8, 12, 0, 0, 0, time.Local) func getAboutPage(app *App) (*instanceContent, error) { c, err := app.db.GetDynamicContent("about") if err != nil { return nil, err } if c == nil { c = &instanceContent{ ID: "about", Type: "page", Content: defaultAboutPage(app.cfg), } } if !c.Title.Valid { c.Title = defaultAboutTitle(app.cfg) } return c, nil } func defaultAboutTitle(cfg *config.Config) sql.NullString { - return sql.NullString{String: "About " + cfg.App.SiteName, Valid: true} + var setLang = localize(cfg.App.Lang) + title := setLang.Get("About %s", cfg.App.SiteName) + return sql.NullString{String: title, Valid: true} } func getPrivacyPage(app *App) (*instanceContent, error) { c, err := app.db.GetDynamicContent("privacy") if err != nil { return nil, err } if c == nil { c = &instanceContent{ ID: "privacy", Type: "page", Content: defaultPrivacyPolicy(app.cfg), Updated: defaultPageUpdatedTime, } } if !c.Title.Valid { - c.Title = defaultPrivacyTitle() + c.Title = defaultPrivacyTitle(app.cfg) } return c, nil } -func defaultPrivacyTitle() sql.NullString { - return sql.NullString{String: "Privacy Policy", Valid: true} +func defaultPrivacyTitle(cfg *config.Config) sql.NullString { + var setLang = localize(cfg.App.Lang) + title := setLang.Get("Privacy Policy"); + return sql.NullString{String: title, Valid: true} } func defaultAboutPage(cfg *config.Config) string { + var setLang = localize(cfg.App.Lang) + wf_link := "[WriteFreely](https://writefreely.org)" + content := setLang.Get("_%s_ is a place for you to write and publish, powered by %s.", cfg.App.SiteName, wf_link) if cfg.App.Federation { - return `_` + cfg.App.SiteName + `_ is an interconnected place for you to write and publish, powered by [WriteFreely](https://writefreely.org) and ActivityPub.` + content := setLang.Get("_%s_ is an interconnected place for you to write and publish, powered by %s.", cfg.App.SiteName, wf_link) + return content } - return `_` + cfg.App.SiteName + `_ is a place for you to write and publish, powered by [WriteFreely](https://writefreely.org).` + return content } func defaultPrivacyPolicy(cfg *config.Config) string { - return `[WriteFreely](https://writefreely.org), the software that powers this site, is built to enforce your right to privacy by default. + var setLang = localize(cfg.App.Lang) + wf_link := "[WriteFreely](https://writefreely.org)" + bold_site_name := "**"+cfg.App.SiteName+"**" -It retains as little data about you as possible, not even requiring an email address to sign up. However, if you _do_ give us your email address, it is stored encrypted in our database. We salt and hash your account's password. - -We store log files, or data about what happens on our servers. We also use cookies to keep you logged in to your account. - -Beyond this, it's important that you trust whoever runs **` + cfg.App.SiteName + `**. Software can only do so much to protect you -- your level of privacy protections will ultimately fall on the humans that run this particular service.` + DefPrivPolString := setLang.Get("%s, the software that powers this site, is built to enforce your right to privacy by default.\n\nIt retains as little data about you as possible, not even requiring an email address to sign up. However, if you _do_ give us your email address, it is stored encrypted in our database.\n\nWe salt and hash your account's password.We store log files, or data about what happens on our servers. We also use cookies to keep you logged in to your account.\n\nBeyond this, it's important that you trust whoever runs %s. Software can only do so much to protect you -- your level of privacy protections will ultimately fall on the humans that run this particular service.", wf_link, bold_site_name); + return DefPrivPolString } func getLandingBanner(app *App) (*instanceContent, error) { c, err := app.db.GetDynamicContent("landing-banner") if err != nil { return nil, err } if c == nil { c = &instanceContent{ ID: "landing-banner", Type: "section", Content: defaultLandingBanner(app.cfg), Updated: defaultPageUpdatedTime, } } return c, nil } func getLandingBody(app *App) (*instanceContent, error) { c, err := app.db.GetDynamicContent("landing-body") if err != nil { return nil, err } if c == nil { c = &instanceContent{ ID: "landing-body", Type: "section", Content: defaultLandingBody(app.cfg), Updated: defaultPageUpdatedTime, } } return c, nil } func defaultLandingBanner(cfg *config.Config) string { + //var setLang = localize(cfg) + var setLang = localize(cfg.App.Lang) + banner := setLang.Get("# Start your blog") if cfg.App.Federation { - return "# Start your blog in the fediverse" + banner := setLang.Get("# Start your blog in the fediverse") + return banner } - return "# Start your blog" + return banner } func defaultLandingBody(cfg *config.Config) string { + var setLang = localize(cfg.App.Lang) + pixelfed := "[PixelFed](https://pixelfed.org)" + mastodon := "[Mastodon](https://joinmastodon.org)" + content1 := setLang.Get("## Join the Fediverse\n\nThe fediverse is a large network of platforms that all speak a common language. Imagine if you could reply to _Instagram_ posts from _Twitter_, or interact with your favorite _Medium_ blogs from _Facebook_ -- federated alternatives like %s, %s, and WriteFreely enable you to do these types of things.\n\n",pixelfed, mastodon) + iframe := `
+ +
` + content2 := setLang.Get("## Write More Socially\n\nWriteFreely can communicate with other federated platforms like _Mastodon_, so people can follow your blogs, bookmark their favorite posts, and boost them to their followers. Sign up above to create a blog and join the fediverse.") if cfg.App.Federation { - return `## Join the Fediverse - -The fediverse is a large network of platforms that all speak a common language. Imagine if you could reply to Instagram posts from Twitter, or interact with your favorite Medium blogs from Facebook -- federated alternatives like [PixelFed](https://pixelfed.org), [Mastodon](https://joinmastodon.org), and WriteFreely enable you to do these types of things. - -
- -
- -## Write More Socially - -WriteFreely can communicate with other federated platforms like Mastodon, so people can follow your blogs, bookmark their favorite posts, and boost them to their followers. Sign up above to create a blog and join the fediverse.` + return content1 + "\n\n" + iframe + "\n\n" + content2 } return "" } func getReaderSection(app *App) (*instanceContent, error) { c, err := app.db.GetDynamicContent("reader") if err != nil { return nil, err } if c == nil { c = &instanceContent{ ID: "reader", Type: "section", Content: defaultReaderBanner(app.cfg), Updated: defaultPageUpdatedTime, } } if !c.Title.Valid { c.Title = defaultReaderTitle(app.cfg) } return c, nil } func defaultReaderTitle(cfg *config.Config) sql.NullString { - return sql.NullString{String: "Reader", Valid: true} + var setLang = localize(cfg.App.Lang) + title := setLang.Get("Reader") + return sql.NullString{String: title, Valid: true} } func defaultReaderBanner(cfg *config.Config) string { - return "Read the latest posts from " + cfg.App.SiteName + "." + var setLang = localize(cfg.App.Lang) + return setLang.Get("Read the latest posts form %s.", cfg.App.SiteName) } diff --git a/pages/about.tmpl b/pages/about.tmpl index 7c502dc..77c8b6e 100644 --- a/pages/about.tmpl +++ b/pages/about.tmpl @@ -1,29 +1,32 @@ {{define "head"}}{{.ContentTitle}} — {{.SiteName}} {{end}} {{define "content"}}

{{.ContentTitle}}

{{.Content}} {{if .PublicStats}}
-

{{.SiteName}} is home to {{largeNumFmt .AboutStats.NumPosts}} {{pluralize "article" "articles" .AboutStats.NumPosts}} across {{largeNumFmt .AboutStats.NumBlogs}} {{pluralize "blog" "blogs" .AboutStats.NumBlogs}}.

+ {{ $POSTS := .AboutStats.NumPosts }}{{ if eq .AppCfg.Lang "eu_ES" }}{{ $POSTS = 1}}{{ end }} + {{ $BLOGS := .AboutStats.NumBlogs }}{{ if eq .AppCfg.Lang "eu_ES" }}{{ $BLOGS = 1}}{{ end }} + {{ $A := call .Tr "article" $POSTS }}{{ $B := call .Tr "Blog" $BLOGS | tolower }} +

{{call .Tr "_%s_ is home to **%d** %s across **%d** %s." true (variables .SiteName .AboutStats.NumPosts $A .AboutStats.NumBlogs $B )}}

{{end}} {{if not .WFModesty}} -

About WriteFreely

-

WriteFreely is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs.

-

It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others.

+

{{call .Tr "About WriteFreely"}}

+

{{call .Tr "%s is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs." true (variables "WriteFreely;https://writefreely.org/")}}

+

{{call .Tr "It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others."}}

{{end}}
{{end}} diff --git a/templates/read.tmpl b/templates/read.tmpl index 3885c1b..539fec8 100644 --- a/templates/read.tmpl +++ b/templates/read.tmpl @@ -1,142 +1,142 @@ -{{define "head"}}{{.SiteName}} Reader +{{define "head"}}{{.SiteName}} {{call .Tr "Reader"}} {{if gt .CurrentPage 1}}{{end}} {{if lt .CurrentPage .TotalPages}}{{end}} {{end}} {{define "body-attrs"}}id="collection"{{end}} {{define "content"}}

{{.ContentTitle}}

{{if .SelTopic}}#{{.SelTopic}} posts{{else}}{{.Content}}{{end}}

{{ if gt (len .Posts) 0 }}
{{range .Posts}}
{{if .Title.String -}}

{{- if .IsPaid}}{{template "paid-badge" .}}{{end -}}

{{- else -}}

{{- if .IsPaid}}{{template "paid-badge" .}}{{end -}}

{{- end}}

{{if .Collection}}{{call $.Tr "from"}} {{.Collection.DisplayTitle}}{{else}}{{call $.Tr "Anonymous"}}{{end}}

{{if .Excerpt}}
{{.Excerpt}}
{{localstr "Read more..." .Language.String}}{{else}}
{{ if not .HTMLContent }}

{{.Content}}

{{ else }}{{.HTMLContent}}{{ end }}
 
{{localstr "Read more..." .Language.String}}{{end}}
{{end}}
{{ else }}

No posts here yet!

{{ end }} {{if gt .TotalPages 1}}{{end}}
{{end}}